You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main field of your package.json points to index.js but it's internally is in ES6 format. I guess it will break npm expecting main to point to commonjs packages. Instead module field is proposed for ES6 modules and the extension is .mjs, so index.mjs.
I experiment with modules in Node v12 and currently this code:
The
main
field of yourpackage.json
points toindex.js
but it's internally is in ES6 format. I guess it will break npm expectingmain
to point to commonjs packages. Insteadmodule
field is proposed for ES6 modules and the extension is.mjs
, soindex.mjs
.I experiment with modules in Node v12 and currently this code:
throws:
The text was updated successfully, but these errors were encountered: