-
Notifications
You must be signed in to change notification settings - Fork 574
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
ESM modules import does not working #421
Comments
hey @zbinlin , thanks for opening this issue, I've tried to reproduce as you suggested and indeed, the package turns out to be unusable. This is caused by an incorrect exports management in the package.json that is auto-generated during the build phase. Please, if you like, try to propose a PR to fix the problem, it would be nice to have you among the contributors... In the meantime, thanks a lot |
To Reproduce
Steps to reproduce the behavior:
npm init --yes
, and install beautiful-react-hooks."type": "module"
topackage.json
.index.js
file:import "beautiful-react-hooks/useAudio"
.node index.js
, see error:SyntaxError: Cannot use import statement outside a module
.The text was updated successfully, but these errors were encountered: