npm / npm/documentation

Outdated "Upgrading on Windows" - obsolete workarounds?

Open Beginner friendly
#1,998 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
MDX
Stars
712
Forks
4.2k
Avg merge
4d 16h
Merged PRs (30d)
3

Description

Description

In a 64-bit Node.js installation on Windows 11 25H2,

  • C:\Program Files\nodejs\ is added to the system PATH environment variable
  • C:\Users\%USERNAME%\AppData\Roaming\npm is added to the user PATH environment variable

and the system PATH takes precedence over the user PATH. This is correctly described.

The statement:

... it will always use the version of npm installed with node instead of the version of npm you installed using npm -g install npm@<version>.

does not hold true for Node.js 26.4.0, nor for the lowest currently supported Node.js 22.33.1.

The workarounds that are described, appear to be unnecessary and obsolete.

Steps to reproduce

  1. Install https://nodejs.org/dist/v26.4.0/node-v26.4.0-x64.msi with bundled npm 11.17.0 on Windows 11 25H2
  2. In a cmd command terminal window execute echo %PATH% and confirm the priority is:
    1. C:\Program Files\nodejs\
    2. C:\Users\%USERNAME%\AppData\Roaming\npm
  3. Execute npm --version and confirm that the version shown is 11.17.0
  4. Execute npm install npm@11.18.0 -g
  5. Execute npm --version and confirm that the version shown is 11.18.0
  6. Repeat npm --version in the following and confirm they also show npm 11.18.0
    1. Windows PowerShell 5.1
    2. PowerShell 7.6.3
    3. Git Bash

Repeat for Node.js 22.33.1 with bundled npm 10.9.8. Update to npm@11.18.0.

Suggested solution

Review and revise the documentation section for accuracy regarding currently supported versions of Node.js 22, 24 & 26.

URL

https://docs.npmjs.com/try-the-latest-stable-version-of-npm#upgrading-on-windows

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the “Upgrading on Windows” section of the linked npm documentation page and review its statements against the reported Node.js 22, 24, and 26 behavior. Verify the documented commands and workarounds on Windows, then revise the section so it accurately reflects current supported versions and remove obsolete guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.