Skip to content

Issue when using SSR + React (next.js) #20

Closed
@harshzalavadiya

Description

@harshzalavadiya

Thank you for making such an amazing exif parser, compare to others it's really easy to use 👍

Until exifr v2.x I was able to import exifr normally and use ESM module perfectly fine but in v3 and latest v4 it throws SSR error when rendering page using next.js (works fine client side rendered applications i.e. create-react-app)

pfb minimal example reproducing error if we use v2.x and after restarting CSB server you can see that it works just fine

Example Sandbox
v4: (error) - https://codesandbox.io/s/damp-wood-mgfq5
v2: (works) - https://codesandbox.io/s/fragrant-cookies-jtenv

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions