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
(node:59840) 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)
.pnpm/[email protected]/node_modules/openapi3-ts/dist/mjs/oas31.js:1
export * from './dsl/openapi-builder31';
^^^^^^
SyntaxError: Unexpected token 'export'
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:165:29)
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
Node.js v19.9.0
It's probably because the published package.json does not have "type": "module", or that the published files does not end with ".mjs"
The text was updated successfully, but these errors were encountered:
Since cjs would not work with type module, the file ext should be .mjs. Also, tsc doesn't seem to be able to change file ext. microsoft/TypeScript#49462
package.json
app.mjs
it fails to import when running
node app.mjs
It's probably because the published package.json does not have
"type": "module"
, or that the published files does not end with ".mjs"The text was updated successfully, but these errors were encountered: