ng无法识别为内部或外部命令 [英] ng is not recognized as an internal or external command

查看:174
本文介绍了ng无法识别为内部或外部命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行Windows 7 Professional 32位.

Running windows 7 Professional 32bit.

我尝试以普通或管理员身份运行npm install -g angular-cli.

I tried running npm install -g angular-cli both under normal or admin.

我还尝试将其添加到PATH:(C:\Users\Administrator\AppData\Roaming\npm\node_modules\angular-cli\bin\ng)下的环境变量中,也没有成功.

I also tried adding it to the Enviorment Variables under PATH: (C:\Users\Administrator\AppData\Roaming\npm\node_modules\angular-cli\bin\ng) , with no success also.

我在做什么错了?

推荐答案

我按照下图解决了这个问题:

I solved this problem in accordance with the figure:

以cmd运行

 npm install -g @angular/cli

然后

(在Windows 10中打开)控制面板\所有控制面板项目\系统 或按照数字

( open in Windows 10) Control Panel\All Control Panel Items\System or accordance with the figure

第1步:

第2步:

第3步:

第4步:

第5步:

最后,必须重新启动计算机.

And in the end, the computer must be restarted.

这篇关于ng无法识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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