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
[nodemon] starting `node src/Index.bs.js`
(node:21031) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/Users/kevin/Dev/ReScript/rescript-notes/node_modules/@rescript/core/src/Core__Option.bs.js:3
import * as Curry from "rescript/lib/es6/curry.js";
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1195:20)
at Module._compile (node:internal/modules/cjs/loader:1239:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
at Module.load (node:internal/modules/cjs/loader:1133:32)
at Module._load (node:internal/modules/cjs/loader:972:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:168:29)
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
If I sneak a "type":"module" into package.js inside @rescript/core package it starts working
The text was updated successfully, but these errors were encountered:
Try using .bs.mjs suffix. I don't recommend setting type: "module for ReScript packages, since it'll lead to a whole lot of other problems. There's somewhere a post on the forum about it.
Try using .bs.mjs suffix. I don't recommend setting type: "module for ReScript packages, since it'll lead to a whole lot of other problems. There's somewhere a post on the forum about it.
Something is weird about the core Option module, when run with just node
but seems to work just fine with create-react-app (webpack I think)
works
doesn't work
If I sneak a "type":"module" into package.js inside @rescript/core package it starts working
The text was updated successfully, but these errors were encountered: