[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 ......


報錯:

[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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM