2

I need to enter in a project that is Angular 8.1.2 but using the command ng serve I get this error:

This version of CLI is only compatible with Angular versions ^11.0.0-next || >=11.0.0 <12.0.0, but Angular version 8.1.2 was found instead.

So my solution (not working) was:

npm uninstall -g @angular/cli
npm cache clean --force 
npm install -g @angular/cli@8.1.2

But that is not working. And if I type ng version is still:

   _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 11.2.3
Node: 10.23.2
OS: darwin x64

Angular: undefined
... 
Ivy Workspace: <error>

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1102.3
@angular-devkit/core         11.2.3
@angular-devkit/schematics   11.2.3
@angular/cli                 11.2.3
@schematics/angular          11.2.3
@schematics/update           0.1102.3

Any suggestions? Thanks in advance

Pejman Kheyri
  • 4,044
  • 9
  • 32
  • 39
  • 2
    I'm afraid you have misread the error. It's saying that "There's such and such issue, because your CLI version is 8". Install version 11, and it should work. Looks like your local packages are not up-to-date, so just run `npm install` – Marian Mar 08 '21 at 09:33
  • Thank you, but unfortunately that's not working – Emanuel Rista Mar 08 '21 at 09:40
  • 1
    Can you run `npm ls --depth=0` in your project directory, then same with global flag `npm ls -g --depth=0` and check what cli versions you have installed? – Marian Mar 08 '21 at 20:07

0 Answers0