-
Notifications
You must be signed in to change notification settings - Fork 157
chore(schematics): use node version that works for ts-node #16147
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
Conversation
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.
Pull Request Overview
This PR addresses a Node.js regression issue in version 22.18.0 that affects ts-node functionality by adding a specific NODE_OPTIONS flag to disable experimental strip-types feature for the schematics test.
- Adds NODE_OPTIONS="--no-experimental-strip-types" specifically for the schematics test command
- Works around a known Node.js 22.18.0 regression that breaks ts-node execution
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
NODE_OPTIONS="--no-experimental-strip-types" npm run test:schematics | ||
npm run test:i18n | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=4096 |
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.
The NODE_OPTIONS environment variable is being set both inline for the schematics test and globally in the env section. This creates inconsistent configuration and potential conflicts. Consider either moving the --no-experimental-strip-types flag to the global NODE_OPTIONS or ensuring the inline setting properly overrides the global one.
NODE_OPTIONS: --max_old_space_size=4096 | |
npm run test:schematics | |
npm run test:i18n | |
env: | |
NODE_OPTIONS: --max_old_space_size=4096 --no-experimental-strip-types |
Copilot uses AI. Check for mistakes.
Seems like a regression in node 22.18.0: nodejs/node#59364
Having a specific 22.17.1 version is a reasonable solution for the moment, because it is expected the issue above to be fixed. Some of the workarounds suggested weren't working (e.g. 76bb3dc). The other solution could be to set the following: https://github.com/balena-io/balena-sdk/pull/1564/files.
Additional information (check all that apply):
Checklist: