Skip to content

npm-prefix.js is not recognized as an internal or external command in Windows 11 #4537

Open
@Jaiganesh1607

Description

@Jaiganesh1607

Node.js Version

v22.13.0

NPM Version

10.9.2

Operating System

Windows 11

Subsystem

Other

Description

Question:
I recently installed Node.js from the official Node.js website. However, when I try to check the version of npm or perform any npm-related operations, I encounter 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.

Minimal Reproduction

  1. Installed node.js from official website using windows installer.
  2. Tried to check version of npm.

Output

Image

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

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions