3

With reference to Unable to downgrade Angular from version 6 to 5

I tried using the same method npm uninstall -g @angular/cli npm cache clean --force npm install -g @angular/cli@9.0.0

I want to downgrade my current version of angular 11 to angular 9 however when I run ng --version I am still on angular 11

Jellyoo
  • 33
  • 1
  • 1
  • 5

1 Answers1

2

Try this:

npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@9.x.x

If you are thrown npm error, try updating npm before installing:

npm i npm@latest -g
Deepak
  • 2,660
  • 2
  • 8
  • 23
  • 1
    Hi. I'm trying to downgrade from 12 to 11.. however, only CLI does downgrade and not angular itself.. and I get the error when trying to run serve: `This version of CLI is only compatible with Angular versions ^11.0.0-next || >=11.0.0 <12.0.0, but Angular version 12.0.0 was found instead.` – Fisnik Tahiri May 18 '21 at 00:42
  • 1
    @FisnikTahiri Try downgrading the versions in your package.json – Battlefury Jun 16 '21 at 12:46