help icon indicating copy to clipboard operation
help copied to clipboard

npm and Node.js not recognized on Windows 11 after multiple reinstalls

Open ParthKerkar opened this issue 4 months ago • 1 comments

Node.js Version

v22.18.0

NPM Version

v10.9.3

Operating System

Windows 11 (64-bit)

Subsystem

path

Description

Hello Node.js Team,

I am facing persistent issues with Node.js and npm on my Windows 11 machine. After installing the latest stable version from the official site, running node -v works, but running npm -v produces the following error: 'CALL "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-prefix.js"' is not recognized as an internal or external command, operable program or batch file. Interestingly, after this error, the version 10.9.3 still prints, indicating that npm is partially functional but the call script or PATH configuration seems incorrect.

Details:

  1. Node.js version attempted: Latest stable
  2. Installation path: C:\Program Files\nodejs\
  3. PATH: Already included in System Environment Variables

Steps I have taken to resolve the issue:

  1. Completely uninstalled Node.js and deleted all related folders (C:\Program Files\nodejs and npm cache in C:\Users\Parth\AppData\Roaming\npm)
  2. Reinstalled Node.js using default settings
  3. Verified that C:\Program Files\nodejs\ is included in the PATH

Despite these steps, the problem persists.

Request: I would greatly appreciate guidance on: How to properly clean any residual Node/npm files to avoid conflicts Any known solutions for this error on Windows 11

Minimal Reproduction

No response

Output

No response

Before You Submit

  • [x] I have looked for issues that already exist before submitting this
  • [x] My issue follows the guidelines in the README file, and follows the 'How to ask a good question' guide at https://stackoverflow.com/help/how-to-ask

ParthKerkar avatar Aug 24 '25 06:08 ParthKerkar

Try using a package manager like scoop or chocalatey and see it makes any difference?

preveen-stack avatar Aug 29 '25 02:08 preveen-stack