Not able to use npm in WIndows

Viewed 6269

Error message in cmd.exe

Hi I'm not able to use npm on Windows 8.1 64bit. It shows the error message as in image link. I have installed nodejs v5.7.1

ERROR 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 com mand, operable program or batch file. 3.6.0

Tried changing PATH variables and installing a fresh copy in a different drive also

Please help. Thanks

4 Answers

Go to your environment variables and on the system variables section remove the ComSpec variable

First delete this two folders

  • C:\Users\<your user name>\AppData\Roaming\npm
  • C:\Users\<your user name>\AppData\Roaming\npm cache

Then delete the Comspec system variable.

It works definitely on windows machine.

solution is very simple...open advance windows system settings next....edit environment variable..in that...open system variable..in that...change comSpec value o C:\Windows\system32\cmd.exe...then press OK

Related