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

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

问题描述

运行 Windows 7 Professional 32 位.

Running windows 7 Professional 32bit.

我尝试在正常或管理员下运行 npm install -g angular-cli._40">

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) ,但没有成功还有.
_48">

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:

step5:添加缺失的ng路径

最后,重启所有打开的命令提示符并重试.

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

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