-
Notifications
You must be signed in to change notification settings - Fork 140
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
feat: Validate minimum npm version required to use --install-links #546
Conversation
…a-builders into check_min_npm_version
"currently installed npm version does not support " | ||
"--install-links. Please ensure that the npm " | ||
"version is at least 8.8.0. Switching to build " | ||
"in a scratch directory." |
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.
Link to NPM documentation might be useful
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 closest thing to docs that would indicate the minimum version would be this: https://docs.npmjs.com/cli/v8/using-npm/changelog#v880-2022-04-27
I can add this to the message. Additionally I noticed that I've left the message as "switching to scratch directory", which isn't 100% true for Node.js. I can change this to "switching to building outside of the source directory".
Issue #, if available:
None.
Description of changes:
--install-links
is a relatively new addition tonpm
. We'll need to add a check against the currentnpm
version if build in source is enabled since we need to use that option to properly install local dependencies.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.