我已经多次try 卸载Angular CLI以更新它,但即使我按照GitHub上提供的说明进行操作:
- npm卸载-g@angle/cli
- NPM缓存清理
- npm安装-g@angular/cli@latest
当我使用命令ng--version判断时,仍然会得到旧版本:
angular-cli: 1.0.0-beta.26
node: 7.7.1
os: darwin x64
我如何解决这个问题?谢谢
我已经多次try 卸载Angular CLI以更新它,但即使我按照GitHub上提供的说明进行操作:
当我使用命令ng--version判断时,仍然会得到旧版本:
angular-cli: 1.0.0-beta.26
node: 7.7.1
os: darwin x64
我如何解决这个问题?谢谢
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.
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.