I encountered a similar issue and here are the steps I took to resolve it:
- Make sure your node version is above 10
- Execute
ng update @angular/core@12 @angular/cli@12
. You may receive an error message like the one below
Package "@angular-eslint/builder" has an incompatible peer dependency to "@angular/cli" (requires ">= 11.2.0 < 12.0.0", would install "12.0.0").
× Migration failed: Incompatible peer dependencies found.
Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together.
You can use the '--force' option to ignore incompatible peer dependencies and instead address these warnings later.
See "C:\Users\KOTIENO1\AppData\Local\Temp\ng-gY5FIE\angular-errors.log" for further details.
The warning suggests using --force
to bypass the warnings temporarily.
3) Run ng update
. This will provide all necessary commands to run
Using package manager: 'npm'
Collecting installed dependencies...
Found 68 dependencies.
We analyzed your package.json, there are some packages to update:
Name Version Command to update
-------------------------------------------------------------------------------------
@angular-eslint/schematics 4.2.0 -> 12.0.0 ng update @angular-eslint/schematics
@angular/cdk 11.2.11 -> 12.0.0 ng update @angular/cdk
@angular/cli 11.2.11 -> 12.0.0 ng update @angular/cli
@angular/core 11.2.12 -> 12.0.0 ng update @angular/core
@ngrx/store 11.1.1 -> 12.0.0 ng update @ngrx/store
There might be additional packages which don't provide 'ng update' capabilities that are outdated.
You can update the additional packages by running the update command of your package manager.
- Execute
ng update @angular-eslint/schematics @angular/cdk @angular/cli @angular/core @ngrx/store --force
. This aligns with step 3, but yours may vary slightly. Remember to include the --force
flag
This process completes successfully despite several warnings.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0b6d7e796a636a266a7b7b4b3b253b253b">[email protected]</a>
npm WARN Found: @angular/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="61020e0c1108...">
... (additional warnings included in original text) ...
After updating your package.json
file, execute ng serve
to ensure everything works properly
Review the warnings, which are often related to compatibility issues as most angular-related packages expect versions between 10 and 12 for @angular/core. Handle this on a case-by-case basis by updating relevant packages