'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.
I am using windows 8.1 enterprise version, and I have my files in appdata/npm still I am getting the above error. I installed the latest node version,i.e, v6.3.0 and I've even tried with the older version of node ,i.e, v4.4.7 and I am getting the same error.
I had the same issue. Mine also printed this issue.
error file C:\Windows\system32\cmd.exe;
seems I screwed up my comSpec in my environmental variables.
The ";" at the end of that line was causing the error.
Not sure if still have the same the problem but recently I was experienced this annoying error and finished solving by modified the npm.cmd
file found in nodejs installation folder. It seems the error occurs because a wrong use of apostrophes and double quotes when calling the npm.cmd
file. By default the npm.cmd comes in this way:
'CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g'
You need to change that to
"CALL ""%NODE_EXE%"" ""%NPM_CLI_JS%"" prefix -g"
In that way the .cmd must be executed correctly, or at least work for me in Windows 10 OS.
Hope it helps.
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