Skip to content
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

build(npmrc): Explicitly configure the Node version to use #2172

Closed

Conversation

sschuberth
Copy link
Contributor

While package.json files have engines.node set, that specifies a range of compatible runtime Node versions, but not the exact version to build the project.

Choose the current version from the 20 branch.

@@ -1,4 +1,5 @@
# pnpm-related options
shamefully-hoist=true
strict-peer-dependencies=false
engine-strict = true
engine-strict=true
use-node-version=20.13.1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm open to using a different version here according to your preferences @petkivim!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sschuberth!
Node version is already managed by gradle plugin here, version number is defined in gradle.properties.

Setting use-node-version here would cause it to download again even when using the same version number for gradle plugin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Maintaining the version in two places would not be nice anyway. I'll try to think of another approach to make the ORT analyzer use the correct Node version.

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
While `package.json` files have `engines.node` set, that specifies a range
of compatible runtime Node versions, but not the exact version to build
the project. Use `pnpm`'s `use-node-version` directive [1] for that
purpose. Choose the latest 20 version that still matches `engines.node`.

[1]: https://pnpm.io/npmrc#use-node-version

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants