-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
TypeError: (0 , _nanoevents.createNanoEvents) is not a function #45
Comments
@karolis-sh can you leave a comment at this pull request, that you need this fix anf to ask them to release the fix from merged pull request? |
We can’t do it, because it will break Node.js native ESM support. In Node.js (in contract to Babel, which broke the spec) you must explicitly show that this file is ES module. In |
Thanks for explanation! I wasn't aware about the new |
From facebook/create-react-app#9814, but to help out here:
|
The lastest CRA release fixed the problem |
Hi 👋
I'm trying use/test
nanonevents
in codesandbox (https://codesandbox.io/s/mutable-shape-8urc9?file=/src/index.js) and withcreate-react-app
'sjest
, both environments don't work with the library out of the box.As I understand some of the defaults don't work well with
*.cjs
file extension ("main": "index.cjs",
). Maybe it's worth renaming the file to follow a more common extension?FYI: Renaming
index.cjs
->index.cjs.js
and changing"main": "index.cjs",
->"main": "index.cjs.js",
seems to fix the issue.The text was updated successfully, but these errors were encountered: