[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脚手架的版本

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

 

 我的显示版本为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

Related Posts

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注