\'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
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.