Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot update a project from Angular 13 to 14

I have a project which uses Angular 13 and I want to update it to Angular 14.

When I try to update with:

ng update @angular/core@14 @angular/cli@14

I get:

Package "@angular-eslint/schematics" has an incompatible peer dependency to "@angular/cli" (requires ">= 13.0.0 < 14.0.0", would install "14.0.1").

Any ideas on how to avoid this error?

like image 635
Wain2021 Avatar asked Dec 04 '25 05:12

Wain2021


1 Answers

I have two suggestions:


Suggestion 1:

  1. First upgrade the @angular-eslint/schematics package
ng update @angular-eslint/schematics@14
  1. Upgrade Angular
ng update @angular/core@14 @angular/cli@14

Suggestion 2:

  1. Remove all @angular-eslint packages from package.json file and run npm install so the packages would be deleted
npm install
  1. Upgrade Angular
ng update @angular/core@14 @angular/cli@14
  1. Add all @angular-eslint packages with ng add @angular-eslint/schematics command:
ng add @angular-eslint/schematics
like image 91
NeNaD Avatar answered Dec 05 '25 18:12

NeNaD