我已经安装了角度cli,但它在cmd中不能识别 [英] I've installed angular cli but its showing not recognized in cmd

查看:227
本文介绍了我已经安装了角度cli,但它在cmd中不能识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

其实我已经安装了 Nodejs ,然后 npm ,然后 angular cli 正确(afaik)。但是在windows cmd和git bash中,其显示ng --version为:


ng code>不被识别为内部或外部命令,
可操作的程序或批处理文件。

命令提示符





来自github bash




但是当我用节点命令提示符试试这个命令时,它显示了ng版本。





正因为如此,我不能使用ng服务。此外,我试图安装凉亭和吞咽。为他们两人获取相同的未识别错误。帮助解决这个问题。



感谢和问候,
sharfudeen

解决方案 Node.js

如果您已经安装了Node.js,您的机器您可以使用Node.js命令提示符而不是Windows命令提示符。




,然后尝试命令 npm ng --version





在windows提示符下转到您的项目本地目录(使用命令 cd projectdirectorypath ),然后使用相同的命令 npm ng --version

Actually I've installed Nodejs, then npm, then angular cli properly (afaik). But in windows cmd and in git bash, its showing "ng --version" as:

ng is not recognized as an internal or external command, operable program or batch file.

from windows command prompt

from github bash

but when i try this command with node command prompt, it showing the ng version.

Because of this, i cannot use ng serve. Also i've tried to install bower and gulp. Getting the same "not recognised" error for both of them. Help to solve this.

Thanks and Regards, sharfudeen

解决方案

First of all please ensure you have installed Node.js on your machine

If You have already installed Node.js your machine you can take the Node.js command prompt instead of windows command prompt

and then try the command npm ng --version

On windows prompt go to your project local directory(use command cd projectdirectorypath) and then use the same command npm ng --version

这篇关于我已经安装了角度cli,但它在cmd中不能识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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