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
$ npx ts-eager test.js
(node:66787) 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/wizard/src/telley-live/telley-api/test.js:1
import slugify from '@sindresorhus/slugify'
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:979:16)
at Module._compile (internal/modules/cjs/loader.js:1027:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
My settings for esbuild are able to bundle it however.
I went to import @sindresorhus/slugify which uses
module:true
in it's pacakge.json and it's .js files are esm. Here's a simple test case.And when I run it
My settings for esbuild are able to bundle it however.
The text was updated successfully, but these errors were encountered: