-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
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
Upgrade Node.js to v20 and fix loading swc-node #4513
Conversation
Not associated with this project, just saw the link in swc-project/swc-node#748 This was already fixed, so you should be able to replace the `--loader like: @@ -16,16 +16,16 @@
},
"scripts": {
"//": "All of these should be executed from the js_src directory",
- "localizationTests": "node --loader @swc-node/register/esm lib/localization/__tests__/scanUsages.ts",
- "pullFromWeblate": "node --loader @swc-node/register/esm lib/localization/utils/pull.ts",
- "schema:extract": "node --loader @swc-node/register/esm lib/localization/schema-localization/extract.ts",
- "schema:pullFromWeblate": "node --loader @swc-node/register/esm lib/localization/schema-localization/pull.ts",
+ "localizationTests": "node --import @swc-node/register/esm-register lib/localization/__tests__/scanUsages.ts",
+ "pullFromWeblate": "node --import @swc-node/register/esm-register lib/localization/utils/pull.ts",
+ "schema:extract": "node --import @swc-node/register/esm-register lib/localization/schema-localization/extract.ts",
+ "schema:pullFromWeblate": "node --import @swc-node/register/esm-register lib/localization/schema-localization/pull.ts",
"test": "npm run typecheck && npm run unitTests && npm run localizationTests",
"typecheck": "tsc",
"unitTests": "jest",
"unitTests:coverage": "jest --coverage",
"unitTests:watch": "jest --watch",
- "validateWeblate": "node --loader @swc-node/register/esm lib/localization/__tests__/validateWeblate.ts"
+ "validateWeblate": "node --import @swc-node/register/esm-register lib/localization/__tests__/validateWeblate.ts"
},
"dependencies": {
"@codemirror/lang-json": "^6.0.0", |
@ehaynes99 Thanks for the comment! we moved from ts-node to swc because ts-node started failing on new node.js version. Now swc is failing on new node.js version 🤪 |
Looks like because we are currently using node version 18.19.0 that we should be using |
Can we update the CI and Dockerfile to 20 then? |
After updating to node v20.6 and changing
I get this error when I try using
|
ok, so node got upgraded to >v20.6, so the directions are to use |
Triggered by 3dd385e on branch refs/heads/issue-4458
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given how many commits this took, I am sorry you had to fight with it so much to get it to work
but thanks for updating us to newer node.js version
specifyweb/frontend/js_src/lib/components/Forms/DeleteBlocked.tsx
Outdated
Show resolved
Hide resolved
README.md still mentions node.js 18 in two places: could you please update? |
This PR is looking good now. Should be ready to merge into production. |
Triggered by 657d4a2 on branch refs/heads/issue-4458
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💎
Hmm, the github action is still failing despite the changes in this PR:
That is because our local version of |
Fixes #4458
This PR temporarily migrates away from swc until the issues swc-project/swc-node#748 and swc-project/swc-node#743 are in the next release, presumably version 1.8.1. This fix will be considered as a solution when the Weblate error doesn't occur in our project build/testing.