npm -v 命令显示错误,如 -g 未被识别为内部或外部命令 [英] npm -v Command shows Error like -g is not recognized as an internal or external com mand
问题描述
我是 node.js 的新手,我正在尝试在我的 Window 8 pc 中安装 node.js.node.js 安装成功,但是当输入命令 npm -v 时,它会显示错误类似...
i am new in node.js and i am trying to install node.js in my Window 8 pc. node.js installed successfully but when is type command npm -v it's show Error Something like...
C:\windows\system32>npm -v
C:\windows\system32>npm -v
'CALL "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" 前缀 -g' 不被识别为内部或外部 com曼德,可运行的程序或批处理文件.5.6.0
'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 mand, operable program or batch file. 5.6.0
推荐答案
有时您必须手动将 node
和 npm
添加到路径中.这是一个说明:在 Windows 10 上安装 Node.js(和 npm)
Sometimes you have to add node
and npm
to paths manually. Here is an instruction: Installing Node.js (and npm) on Windows 10
这篇关于npm -v 命令显示错误,如 -g 未被识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!