Mohadeseh saket
Mohadeseh saket

Reputation: 81

When upgrading Angular 6to 8, I get incompatible peer dependency (using ng update @angular/core)

I'm using this command ng update @angular/cli @angular/corefor to update angular version from 6 to 8 but it showing this bellow problem.

Package "@nguniversal/module-map-ngfactory-loader" has an incompatible peer dependency to "@angular/core" (requires ">=7.0.0-rc.0 <8.0.0||>=6.0.0-rc.0 <7.0.0", would install "8.2.5").
Package "@nguniversal/module-map-ngfactory-loader" has an incompatible peer dependency to "@angular/common" (requires ">=7.0.0-rc.0 <8.0.0||>=6.0.0-rc.0 <7.0.0", would install "8.2.5").
Package "@nguniversal/module-map-ngfactory-loader" has an incompatible peer dependency to "@angular/platform-server" (requires ">=7.0.0-rc.0 <8.0.0||>=6.0.0-rc.0 <7.0.0", would install "8.2.5").

Incompatible peer dependencies found. See above.

Upvotes: 4

Views: 4330

Answers (2)

patrickbadley
patrickbadley

Reputation: 2590

When upgrading from Angular 8.2 to 10, I received a similar error. Running:

npm uninstall @nguniversal/module-map-ngfactory-loader

and then ng update worked for me.

Upvotes: 12

Mohadeseh saket
Mohadeseh saket

Reputation: 81

first, check the dependencies one by one from the last one and use bellow code fore example :

npm uninstall @angular/http

And again use:

ng update @angular/cli @angular/core

Now you have to check what is your dependencies then one by one remove and after all, you will see your code will be updated.

then from last dependencies, you have to install your new version of your dependencies.

Upvotes: 4

Related Questions