卸载并安装指定版本Angular CLI

1.卸载之前的版本

npm uninstall -g @angular/cli

2.清除缓存,确保卸载干净

npm cache clean

3.检查是否卸载干净

输入命令

ng -v

若显示command not found则卸载干净

4.安装指定版本

npm install -g @angular/cli@1.6.3

5.检查版本号

ng -v

效果如图所示:

https://blog.csdn.net/ittvibe/article/details/79062838?utm_source=copy

原文地址:https://www.cnblogs.com/twoheads/p/9754823.html