-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Prefer node-version-file: package.json
over $PATH by default
#912
Comments
Hello @fregante |
Hello @fregante, We've merged the fix for the issue as part of another issue. Could you please try to use actions/setup-node@main to confirm that it works as expected? |
Thank you! Unfortunately that didn't seem to work. with node-version-file ✅https://github.com/fregante/webext-storage/actions/runs/7458660958 without ❌https://github.com/fregante/webext-storage/actions/runs/7458664070 |
Hello @fregante, Thank you for testing. |
without node-version-file, on
|
That PR is unrelated to this feature request. The tests on setup-node/__tests__/main.test.ts Lines 185 to 187 in d86ebcd
|
Great issue and great research. I was just wondering the same thing, would be great if the version would just work™ |
Additionally, this would provide a nice way to configure both the node and npm version. Currently, actions/setup-node will install a npm version that does generally not match |
@kleinfreund that's unrelated, this request is exclusively about changing a default. For what you're asking refer to: |
I added this one to my suggested way of merging all the version number oracles over here in issue 939.
The many repetitions of the same "with:" parameters are not specifically related to this one option. It should thus be an issue of its own, and should probably be solved by a config file mechanism. |
Description:
Currently this uses what's available in $PATH, but I reckon it should prefer what the user already specified as a compatible node version in the package.json.
Justification:
It feels strange that a project clearly and "natively" specifies what version it's expected to run on, but the environment ignores it, requiring further config.
I love that
node-version-file: package.json
is possible now, but I wish I didn't have to clutter all of my jobs withThe drawback is that in the rare situation where the user wants to use what's in PATH, as opposed to what's in package.json, now they'd need something like
node-version: PATH
. But again this feels like it should be the minority.Are you willing to submit a PR?
Potentially
The text was updated successfully, but these errors were encountered: