How To Fix “This version of CLI is only compatible with Angular versions ^13.0.0, but Angular version 12.2.13 was found instead”?
Are you having problems with the issue “This version of CLI is only compatible with Angular versions ^13.0.0, but Angular version 12.2.13 was found instead“? How to fix it? In today’s article, I will provide solutions for you to solve the issues. Please follow the below steps to get the problem resolved now
How did “This version of CLI is only compatible with Angular versions ^13.0.0, but Angular version 12.2.13 was found instead” occur?
This version of CLI is only compatible with Angular versions ^13.0.0, but Angular version 12.2.13 was found instead
When you work with Angular, you may get the issue This version of CLI is only compatible with Angular versions ^13.0.0, but Angular version 12.2.13 was found instead. Don’t worry, we are here to provide you solutions in order to resolve your problem.
How to fix “This version of CLI is only compatible with Angular versions ^13.0.0, but Angular version 12.2.13 was found instead”?
To Solve This version CLI is not compatible with Angular versions older than 13.0.0. However, Angular 12.2.13 was found to be compatible. You can also change @angular-devkit/build-angular in Package.json. Just open Your package.json file and find this pne: “@angular-devkit/build-angular”: “^13.0.2” replace above pne with this Line: “@angular-devkit/build-angular”: “~0.1102.3” Now, Run Your app and Your error must be solved.
Solution 1: Modify build-angular
This will solve your problem. Simply change angular-devkit/build-angular
to ^13.0.2
to ^12.2.8
.
Solution 2: Run This Command
Just open your terminal and run the following command.
npm i @angular-devkit/[email protected] --force
npm i @angular/cli@12
Now, you should correct your error.
Solution 3: Change @angular-devkit/build-angular in Package.json
Simply change @angular-devkit/build-angular in Package.json Simply open the file Your package.json and locate this line.
"@angular-devkit/build-angular": "^13.0.2"
Replace the line above with this Line.
"@angular-devkit/build-angular": "~0.1102.3"
Now, run Your app.
Final words
The above are useful solutions that can help you fix “This version of CLI is only compatible with Angular versions ^13.0.0, but Angular version 12.2.13 was found instead” problem, if you can’t solve it well. Please leave a message.