Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load fs and zlib #107

Open
rainwashed opened this issue Mar 28, 2023 · 1 comment
Open

Can't load fs and zlib #107

rainwashed opened this issue Mar 28, 2023 · 1 comment

Comments

@rainwashed
Copy link

Hello. I am trying to use this library to read EXIF data from my own photos to display on my website. I have a backend server with pocketbase that returns a file url, which is downloaded with the fetch function and converted into an ArrayBuffer. My website is written in Next.js, and the actual parsing of the Exif data is happening on the server-side of Next.js (I am using the beta version 13).

This is the error:

Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/exifr/dist/full.umd.js
./src/app/(photos)/view/ÄphotoidÅ/page.tsx
Couldn't load fs
Couldn't load zlib
ä params: ä photoid: 'snow' å, searchParams: äå å
ä photoid: 'snow' å
search factor: snow
snow http://127.0.0.1:8090/api/files/n14p59tmhilesp5/b0p1pugmpxb6n8d/dsc_0241_b1mRMX9pz2.JPG
ä params: ä photoid: 'snow' å, searchParams: äå å
ä photoid: 'snow' å
search factor: snow
snow http://127.0.0.1:8090/api/files/n14p59tmhilesp5/b0p1pugmpxb6n8d/dsc_0241_b1mRMX9pz2.JPG
Couldn't load fs
Couldn't load zlib

Code:

let fileBytes = await (
    await fetch(fileUrl, {
      cache: "no-store",
    })
  ).arrayBuffer();

  exif.parse(fileBytes);

I am not sure what to do, any help would be appreciated. Thanks!

@PiXeL16
Copy link

PiXeL16 commented May 18, 2023

Did you solve this? having the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants