When I try to run npm install on windows, I get the following error. How can get rid of it?
D:\Xampp\htdocs\laravelchat>npm install
'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.
As you can see C:\Program Files\nodejs\\node.exe has two slashes \. You need to remove \ from the end of C:\Program Files\nodejs\ which is defined in environment variable. Follow following steps to set up path for nodejs and npm
sysdm.cpl in command prompt), and click Advanced tab.Environmental Variables. A pop-up window will open displaying Path under System Variables. Check whether the Path is determined as C:\Program Files\nodejs or C:\Program Files (*86)\nodejs. Remember not to include \ at the end. If Path is not determined, append the path manually by clicking Edit.You must install NodeJs if you didn't install it yet. NodeJs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With