Skip to content

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

@ParthKerkar

Description

@ParthKerkar

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

  • I have looked for issues that already exist before submitting this
  • 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions