報錯:
[ng] This version of CLI is only compatible with Angular versions ^10.0.0-beta || >=10.0.0 <11.0.0,
[ng] but Angular version 8.1.3 was found instead.
[ng] Please visit the link below to find instructions on how to update Angular.
[ng] https://angular-update-guide.firebaseapp.com/
[ERROR] ng has unexpectedly closed (exit code 3).
解決辦法:
首先ng -v查看一下angular-cli腳手架的版本
我的顯示版本為10.1.6,其它的顯示8.1.3,版本不兼容,需要安裝一下對應的版本
具體步驟:
1.卸載當前的angular/cli
npm uninstall @angular/cli --save-dev
2.安裝對應版本的angular/cli 在這里我需要安裝8.1.3的
npm install @angular/cli@~8.1.3 --save-dev