加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angular – Ubuntu 16无法识别ng命令

发布时间:2020-12-17 10:18:44 所属栏目:安全 来源:网络整理
导读:The program ‘ng’ is currently not installed. You can install it by typing: sudo apt install ng-common 我在安装过程中没有错误,我该如何解决? 编辑:当我尝试运行新的PROJECT_NAME时会发生这种情况 首先在你所在的目录中回到主目录 ie prashanth:~/

The program ‘ng’ is currently not installed. You can install it by
typing: sudo apt install ng-common

我在安装过程中没有错误,我该如何解决?

编辑:当我尝试运行新的PROJECT_NAME时会发生这种情况

首先在你所在的目录中回到主目录

ie prashanth:~/Projects/angular2$cd
—->
prashanth:~$

然后输入以下命令

npm bin -g
outputs—> /usr/bin

下一个,

sudo npm rm -g angular-cli

清除npm缓存,

npm cache clear

然后在全球安装angular-cli,

sudo npm install -g angular-cli

现在你好好去,输入

ng -v

并检查安装的版本.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读