Patriot
Patriot

Reputation: 405

npm command return message -g' is not recognized as an internal or external command

I'm using Windows 8.1 64-bit and install npm with Windows Installer from nodejs.org. Every time i enter npm command, it always showing this message: 'CALL "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command, operable program or batch file.

Error while running npm “prefix -g is not recognized as an internal or external command” not solving my problem

node -v

v6.10.0

npm -v

'CALL "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command, operable program or batch file.

3.10.10

npm config get registry

'CALL "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command, operable program or batch file.

https://registry.npmjs.org/

Upvotes: 3

Views: 1716

Answers (2)

Patriot
Patriot

Reputation: 405

It solved now. it is not an error of nodejs PATH. But one of my environment variable named ComSpec has multiple value, it only allow one

Upvotes: 2

TanguyB
TanguyB

Reputation: 2006

This error refers to your PATH variable not pointing to the right path of NodeJS. Double check your env. vars and check if it is set to the right path.

Upvotes: 1

Related Questions