Closed shamas closed 1 year ago
Thanks for sharing. I'll update it to <20
, or >=20
(and npm >=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)
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 :)
Note that node v20 won't compile due to https://github.com/nodejs/node/issues/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