Skip to content

[Fix] install-latest-npm: npm v12 is out - #3986

Merged
ljharb merged 1 commit into
nvm-sh:masterfrom
NotAFlightRisk:install-latest-npm-v12
Nov 11, 2026
Merged

ljharb merged 1 commit into
nvm-sh:masterfrom
NotAFlightRisk:install-latest-npm-v12

Conversation

@NotAFlightRisk

Copy link
Copy Markdown
Contributor

Since npm 12 came out, nvm install-latest-npm on something like node 22.12 or 24.10 gives you an npm that doesn't support it. npm 12 only takes node ^22.22.2 || ^24.15.0 || >=26.0.0 (its engines field), and nvm still installs the latest on everything from 20.17 up, bar 21 and early 22.

This pins npm 11 for the gap (20.17+, 22.9 to 22.22.1, 23, 24.0 to 24.14 and 25), same as npm 10 got pinned when 11 came out. The unit test now checks either side of each boundary - I ran it under sh, bash and zsh, not ksh.

@ljharb
ljharb force-pushed the install-latest-npm-v12 branch from 9ac3ffd to 015c4f1 Compare November 11, 2026 22:09

@ljharb ljharb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks, not sure how i forgot to do this :-)

@ljharb
ljharb merged commit 015c4f1 into nvm-sh:master Nov 11, 2026
582 of 594 checks passed
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