[Resolved] This version of CLI is only compatible with Angular versions 0.0.0 || ^10.0.0-beta || >=10.0.0 <11.0.0

Dung Do Tien Sep 09 2020 103

My web application is still working normal but after I run the command  npm install --save-dev @angular/[email protected] 

But  now, I start my app with ng server -o comm and and I got an error as below:

This version of CLI is only compatible with Angular versions 0.0.0 || ^10.0.0-beta || >=10.0.0 <11.0.0,
but Angular version 9.1.12 was found instead.

Below is the information of my angular CLI:

Angular CLI: 10.1.0
Node: 12.18.3
OS: win32 x64

Angular: 9.1.12
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.12
@angular-devkit/build-angular     0.901.12
@angular-devkit/build-optimizer   0.901.12
@angular-devkit/build-webpack     0.901.12
@angular-devkit/core              9.1.12
@angular-devkit/schematics        10.1.0
@angular/cli                      10.1.0
@ngtools/webpack                  9.1.12
@schematics/angular               10.1.0
@schematics/update                0.1001.0
rxjs                              6.6.3
typescript                        3.7.5
webpack                           4.42.0

Please help me if you know any reason.

Thanks!

Have 1 answer(s) found.
  • You get an error because your app angular is 9.1.12 and your angular CLI is 10.1.0. So angular cli 10 only run in angular 10. You have 2 solutions update angular upto version 10 or update angular cli to version 9.

    This is command for solution 2:

    npm install --save-dev @angular/[email protected] 

    I hope it helpful for you.

    Sandeep Kumar Sep 09 2020
Leave An Answer
* NOTE: You need Login before leave an answer

* Type maximum 2000 characters.

* All comments have to wait approved before display.

* Please polite comment and respect questions and answers of others.

Popular Tips