npm is not recognized as an internal or external command in windows
16,661
Solution 1
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
- Open the system properties (enter
sysdm.cplin command prompt), and clickAdvancedtab. - Click
Environmental Variables. A pop-up window will open displayingPathunderSystem Variables. Check whether thePathis determined asC:\Program Files\nodejsorC:\Program Files (*86)\nodejs. Remember not to include\at the end. IfPathis not determined, append the path manually by clicking Edit.
Solution 2
You must install NodeJs if you didn't install it yet. NodeJs
Author by
Nayeem Hyder Riddhi
Enthusiastic about learning Programming like Php,Wordpress,Laravel
Updated on July 23, 2022Comments
-
Nayeem Hyder Riddhi 5 months
When I try to run
npm installon 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.