'调用“C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js"前缀 -g' 不被识别为内部或外部命令, [英] 'CALL "C:\Program Files\nodejs\\node_modules \npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external com mand,

查看:41
本文介绍了'调用“C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js"前缀 -g' 不被识别为内部或外部命令,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C:\Users\MNE GO DIGITAL>npm
'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.

我已经在 c 盘上安装了 nodejs当我点击 npm --v 时,它也说明了同样的错误

i have installed nodejs on c drive when i hit npm --v also it state this same error

C:\Users\MNE GO DIGITAL>npm
'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.

请查找附件以获得更多说明

please find attachment for more clarification

在 Windows 7 上执行 npm 时出错

Error in executing npm on windows 7

推荐答案

我只是在这个问题上花了很长时间.我不确定它是如何设置的,也许是在安装过程中,但我更改了系统变量:

I just spend way to long with this issue. I'm not sure how it got set, perhaps during an install, but I changed a System Variable:

名称:ComSpec 值:%SystemRoot%\system32\cmd.exe;prefix=C:\Program Files (x86)\nodejs\node.exe

Name: ComSpec Value: %SystemRoot%\system32\cmd.exe;prefix=C:\Program Files (x86)\nodejs\node.exe

为此:

名称:ComSpec 值:%SystemRoot%\system32\cmd.exe

Name: ComSpec Value: %SystemRoot%\system32\cmd.exe

然后重新启动我的系统,问题就消失了.

And restarted my system and the issue was gone.

这篇关于'调用“C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js"前缀 -g' 不被识别为内部或外部命令,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆