8000 Fix node version detection in nvm_install_latest_npm by todeveni · Pull Request #3564 · nvm-sh/nvm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix node version detection in nvm_install_latest_npm #3564

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

Merged
merged 1 commit into from
Apr 9, 2025

Conversation

todeveni
Copy link
Contributor
@todeveni todeveni commented Apr 9, 2025

nvm_version_greater 20.17.0 v22.14.0 exits with code 3 and nvm thinks node version is NVM_IS_20_5_OR_ABOVE thinking npm@10 is the latest compatible with 22.14.0.

Switch to nvm_version_greater_than_or_equal_to and for consistency change NVM_IS_20_17_or_ABOVE variable to uppercase.

Before patch

$ nvm version
v22.14.0
$ nvm install-latest-npm
Attempting to upgrade to the latest working version of npm...
* `npm` `v10.x` is the last version that works on `node` `< v20.17`, `v21`, or `v22.0` - `v22.8`

After patch

$ nvm version
v22.14.0
$ nvm install-latest-npm
Attempting to upgrade to the latest working version of npm...
* Installing latest `npm`; if this does not work on your node version, please report a bug!

Copy link
Member
@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

thanks, this looks correct

@ljharb ljharb merged commit 99352a6 into nvm-sh:master Apr 9, 2025
186 of 188 checks passed
@hansda0

This comment was marked as spam.

@hansda0

This comment was marked as spam.

hansda0

This comment was marked as spam.

hansda0

This comment was marked as spam.

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.

3 participants
0