find and solve || findandsolve.com
Please wait.....

Incompatible Peer Dependencies found - Upgrading Angular from 8 to 12

Incompatible Peer Dependencies found - Upgrading Angular from 8 to 12

When I am trying to update my angulalr version using 'ng update @angular/cli @angular/core' this type of error hase been occured as given below.

Using package manager: 'npm'

Collecting installed dependencies...

Found 38 dependencies.

Fetching dependency metadata from registry...

                  Package "@nguniversal/module-map-ngfactory-loader" has an incompatible peer dependency to "@angular/common" (requires "^8.0.0" (extended), would install "11.2.6").

                  Package "codelyzer" has an incompatible peer dependency to "@angular/compiler" (requires ">=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0" (extended), would install "11.2.6").

                  Package "codelyzer" has an incompatible peer dependency to "@angular/core" (requires ">=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0" (extended), would install "11.2.6").

                  Package "@nguniversal/module-map-ngfactory-loader" has an incompatible peer dependency to "@angular/platform-server" (requires "^8.0.0" (extended), would install "11.2.6").

× 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\User-Pc\AppData\Local\Temp\ng-giUvyv\angular-errors.log" for further details.


Answer

Option 1.

Trying to lower version of @ngtools/webpack that works with TypeScript 3.4 to 3.5.

ng update @ngrx/store --next --force /*this is working fine in the above issue OR*/
Package "@ngtools/webpack" has an incompatible peer dependency to "typescript" (requires ">=3.4 < 3.6", would install "3.7.5").

Option 2.

In a some case, the workaround was to use the --force flag when running ng update [package] to override the dependency issues

Option 3.

You have done successfully without error.

ng update @angular/compiler-cli 

Option 4 .

In the future if you see something like that just know you can also use that version range in your install command so you don’t need to hunt down a version #

npm install [email protected]“>3.4<3.5”

Mahira  khanna

Mahira khanna

I have the skills you need for you company blog, website, or other content materials

Comments



Report Response