无法卸载angular-cli [英] Cannot uninstall angular-cli

查看:414
本文介绍了无法卸载angular-cli的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试了几次卸载我的angular-cli来更新它,但是即使我按照github上提供的说明进行操作:

I've tried several times to uninstall my angular-cli in order to update it but even if I follow the instructions provided on github:

  • npm卸载-g @ angular/cli
  • npm缓存清理
  • npm install -g @ angular/cli @ latest

当我使用ng --version命令检查时,我仍然得到旧版本:

When I check using the command ng --version I still get the old version :

 angular-cli: 1.0.0-beta.26

 node: 7.7.1
 os: darwin x64

如何解决此问题?谢谢

推荐答案

如果您遇到angular/cli的问题,请使用以下命令:
npm uninstall -g angular-cli 卸载angular/cli.
npm cache clean 可以从用户名下的应用程序数据文件夹中清除npm缓存.
使用 npm cache verify 来验证您的缓存是否损坏.
使用 npm cache verify --force 从系统中清除整个缓存.

If you are facing issue with angular/cli then use the following commands:
npm uninstall -g angular-cli to uninstall the angular/cli.
npm cache clean to clean your npm cache from app data folder under your username.
use npm cache verify to verify your cache whether it is corrupted or not.
use npm cache verify --force to clean your entire cache from your system.

注意:
您还可以通过以下路径删除
C:\Users\"Your_syste_User_name"\AppData\Roaming\npm
C:\Users\"Your_syste_User_name"\AppData\Roaming\npm-cache
然后使用以下命令在系统中全局安装最新的angular/cli版本.
npm install -g @angular/cli@latest
要获取更多信息,请访问 github angular-cli更新.

Note:
You can also delete by the following the paths
C:\Users\"Your_syste_User_name"\AppData\Roaming\npm and
C:\Users\"Your_syste_User_name"\AppData\Roaming\npm-cache
Then use the following command to install latest angular/cli version globally in your system.
npm install -g @angular/cli@latest
To get more information visit github angular-cli update.

这篇关于无法卸载angular-cli的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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