0

I'm using below versions for running an angular app:

Angular CLI: 8.3.14
Node: 14.15.5
OS: win32 x64
Angular: 12.1.0

But while trying to run the project with npm start, I'm getting below error:

This version of CLI is only compatible with Angular versions ^8.0.0-beta || >=8.0.0 <9.0.0, but Angular version 12.1.0 was found instead.

Can someone help me to change its version to fix this issue and run the solution.

Lim
  • 33
  • 1
  • 8
  • 1
    You need to upgrade your global CLI version. https://stackoverflow.com/questions/43931986/how-to-upgrade-angular-cli-to-the-latest-version – Milind Sharma Jun 29 '21 at 10:47
  • Why _are_ you using Angular CLI 8 with Angular 12? Normally the upgrade path is `ng update @angular/cli @angular/core`. – jonrsharpe Jun 29 '21 at 10:51

2 Answers2

0

Try this:

npm uninstall -g @angular/cli
npm i -g @angular/cli

After updating it is better to clean cache form npm too:

npm cache clean --force

and install project packages again:

npm i 
Saghi Shiri
  • 537
  • 5
  • 19
0

Use this command:

npm install -g @angular/cli@latest
Salahuddin Ahmed
  • 4,854
  • 4
  • 14
  • 35