We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Note that node v20 won't compile due to nodejs/node#47880
Might want to add a <20.0.0 to the package. Or just close this to have a record if someone encounters the issue.
Build error
$ npm i && npm run build npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '[email protected]', npm WARN EBADENGINE required: { node: '>=16.0.0 <20.0.0', npm: '>=8.0.0' }, npm WARN EBADENGINE current: { node: 'v20.8.0', npm: '10.1.0' } npm WARN EBADENGINE } up to date, audited 735 packages in 763ms 97 packages are looking for funding run `npm fund` for details 4 vulnerabilities (3 moderate, 1 high) To address all issues, run: npm audit fix Run `npm audit` for details. > [email protected] build > npm run __prepare-folder && npm run __check-types && NODE_ENV=production ts-node --esm build.ts > [email protected] __prepare-folder > rimraf dist && copyfiles LICENSE manifest.json dist && copyup public/images/icon128.png public/* dist && cp -R public/themes dist > [email protected] __check-types > tsc --noEmit TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/shamas/MonoLabs/taska/projects/my-notes-copy/build.ts at new NodeError (node:internal/errors:406:5) at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:99:9) at defaultGetFormat (node:internal/modules/esm/get_format:142:36) at defaultLoad (node:internal/modules/esm/load:120:20) at nextLoad (node:internal/modules/esm/hooks:833:28) at load (/Users/shamas/MonoLabs/taska/projects/my-notes-copy/node_modules/ts-node/dist/child/child-loader.js:19:122) at nextLoad (node:internal/modules/esm/hooks:833:28) at Hooks.load (node:internal/modules/esm/hooks:416:26) at MessagePort.handleMessage (node:internal/modules/esm/worker:168:24) at [nodejs.internal.kHybridDispatch] (node:internal/event_target:807:20) { code: 'ERR_UNKNOWN_FILE_EXTENSION' }
The text was updated successfully, but these errors were encountered:
Thanks for sharing. I'll update it to <20, or >=20 (and npm >=10).
<20
>=20
>=10
To make the build work in Node 20, we create:
// register.js import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("ts-node/esm", pathToFileURL("./build.ts"));
And then we update:
"build": "npm run __prepare-folder && npm run __check-types && NODE_ENV=production node --import ./register.js ./build.ts"
Running the build should now work. (other unrelated scripts will need updating too)
Sorry, something went wrong.
Verified that fix as described is working 👍
Hi @shamas
just to let you know, My Notes now uses Node 20, and all packages have been updated (typescript, esbuild, jest,...).
Feel free to Fork the project :)
Successfully merging a pull request may close this issue.
Note that node v20 won't compile due to nodejs/node#47880
Might want to add a <20.0.0 to the package. Or just close this to have a record if someone encounters the issue.
Build error
The text was updated successfully, but these errors were encountered: