You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
npm-prefix.js is not recognized as an internal or external command in Windows 11 #4537
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
Installed node.js from official website using windows installer.
Tried to check version of npm.
Output
Before You Submit
I have looked for issues that already exist before submitting this
I got the same error with install node by custom path, when install nodejs, you also get node->lib dir, the node_modules is there, just move the node_modules simply into nodejs bin path can solve the error.
Activity
gadha02 commentedon Feb 5, 2025
I have the same error. How you resolved this issue?
avivkeller commentedon Apr 7, 2025
Hi! Can you try installing via one of the other installation methods listed on the site?
choco, for example? What happens then?yutian1993 commentedon Apr 14, 2025
I got the same error with install node by custom path, when install nodejs, you also get node->lib dir, the node_modules is there, just move the node_modules simply into nodejs bin path can solve the error.
avivkeller commentedon Apr 29, 2025
No response from OP, closing as stale. Assuming the comment above resolved the issue
Jaiganesh1607 commentedon May 16, 2025
i uninstalled and reinstalled node.js a bunch of times and during one installation it worked out fine.
pushkardeep commentedon May 8, 2026
what about using docker ??