Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to use npm in WIndows

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

like image 400
Deepak Kumar Jain Avatar asked Nov 09 '22 18:11

Deepak Kumar Jain


1 Answers

Download Cygwin

Launch Cygwin Terminal as Administrator, then run the following command

curl -L "https://npmjs.org/install.sh" | sh

This will do a fresh install of NPM. It could take a while to download but once the install completed if everything was successful, the last thing printed will be It Worked.


EDIT: Changed from npm-windows-upgrade to Cygwin
like image 87
peteb Avatar answered Nov 15 '22 06:11

peteb