安装了新的angular版本后无法运行老的angular版本项目

  • Post author:
  • Post category:其他

运行 ng serve 报错如下

This version of CLI is only compatible with Angular versions ^9.0.0-beta || >=9.0.0 <10.0.0,
but Angular version 8.2.14 was found instead.
Please visit the link below to find instructions on how to update Angular.
https://angular-update-guide.firebaseapp.com/

  1. 只修改本项目 Update Angular Project

卸载当前angular/cli
npm uninstall @angular/cli –save-dev
安装对应版本的angular/cli
npm install @angular/cli@~8.2.0 –save-dev

  1. 更新全局

卸载当前angular/cli
npm uninstall @angular/cli -g
安装对应版本angular/cli
npm install @angular/cli@~8.2.0 -g


版权声明:本文为u011394575原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。