1.卸载之前的版本

npm uninstall -g @angular/cli

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

npm cache clean

3.检查是否卸载干净

输入命令

ng -v

若显示command not found则卸载干净

4.安装指定版本

npm install -g @angular/[email protected]

这个版本对应的应该是angular4

5.检查版本号

ng -v或ng version

效果如图所示:

卸载并安装指定版本Angular CLI

相关文章:

  • 2021-12-18
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2021-04-30
  • 2022-12-23
  • 2021-12-22
猜你喜欢
  • 2021-09-05
  • 2022-12-23
  • 2021-08-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案