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

Next.js Compatibility #112

Open
joshuatuscan opened this issue Feb 12, 2020 · 2 comments
Open

Next.js Compatibility #112

joshuatuscan opened this issue Feb 12, 2020 · 2 comments

Comments

@joshuatuscan
Copy link

Trying to use this in a Next.js project and get an error from simply trying to import the package.

SyntaxError: Cannot use import statement outside a module

Appears that it doesn't have Node.js-compatible source files — trying to run ES Modules in a Node.js environment.

I would love to try this out in my Next.js projects.

@baptistebriel
Copy link
Owner

This is weird indeed... I'm not using Next.js so I'm not sure. I guess it should support ES6 import statements. My wild guess would be to just copy the content of index.js and import it from your source files instead of npm... Sorry for not having a proper solution for now!

@joshuatuscan joshuatuscan changed the title Node.js Compatibility Next.js Compatibility Mar 31, 2020
@electerious
Copy link

The package uses import but has no "type": "module" in the package.json: https://stackoverflow.com/a/64655153

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

3 participants