📝 Description
|
"import": "./lib/esm/index.js", |
🙁 Actual Behavior
Node parses the .js files as CJS, and chokes on ESM syntax.
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1274:20)
at Module._compile (node:internal/modules/cjs/loader:1320:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
at Module.load (node:internal/modules/cjs/loader:1197:32)
at Module._load (node:internal/modules/cjs/loader:1013:12)
...
Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `nodejs --trace-warnings ...` to show where the warning was created)
🤩 Expected Behavior
Packages follow the naming conventions and name CommonJS files .cjs and ESM files .mjs.
🎬 Steps to Reproduce
🧑💻 Context
🖥️ Your Environment
Node.js 20.18
latest develop branch
- Ledger Device OS Version:
- Application Name and Version:
- Browser Name and Version:
- Operating System and Version:
📝 Description
device-sdk-ts/packages/signer/signer-btc/package.json
Line 11 in a40f346
🙁 Actual Behavior
Node parses the .js files as CJS, and chokes on ESM syntax.
🤩 Expected Behavior
Packages follow the naming conventions and name CommonJS files
.cjsand ESM files.mjs.🎬 Steps to Reproduce
🧑💻 Context
🖥️ Your Environment
Node.js 20.18
latest develop branch