Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
428 views
in Technique[技术] by (71.8m points)

node.js - npm command return message -g' is not recognized as an internal or external command

I'm using Windows 8.1 64-bit and install npm with Windows Installer from nodejs.org. Every time i enter npm command, it always showing this message: 'CALL "C:Program Files odejs ode.exe" "C:Program Files odejs ode_modules pmin pm-cli.js" prefix -g' is not recognized as an internal or external command, operable program or batch file.

Error while running npm “prefix -g is not recognized as an internal or external command” not solving my problem

node -v

v6.10.0

npm -v

'CALL "C:Program Files odejs ode.exe" "C:Program Files odejs ode_modules pmin pm-cli.js" prefix -g' is not recognized as an internal or external command, operable program or batch file.

3.10.10

npm config get registry

'CALL "C:Program Files odejs ode.exe" "C:Program Files odejs ode_modules pmin pm-cli.js" prefix -g' is not recognized as an internal or external command, operable program or batch file.

https://registry.npmjs.org/

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It solved now. it is not an error of nodejs PATH. But one of my environment variable named ComSpec has multiple value, it only allow one


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...