卸载并安装指定版本Angular CLI
卸载之前的版本
npm uninstall -g @angular/cli
清除缓存,确保卸载干净
npm cache clean
检查是否卸载干净
输入ng version
,若显示command not found则卸载干净
安装指定版本
npm install -g @angular/cli@1.6.3
检查版本号
ng version
cli对应版本
![](https://i-blog.csdnimg.cn/blog_migrate/2e511e1b8430d4daf65ef3b7e76b47c2.png)
![](https://i-blog.csdnimg.cn/blog_migrate/d65822657b60a60fd692c32fc8b42d6e.png)
npm uninstall -g @angular/cli
npm cache clean
输入ng version
,若显示command not found则卸载干净
npm install -g @angular/cli@1.6.3
ng version
转载于:https://www.cnblogs.com/bh4lm/p/9083589.html