Issue
While updating to Angular 9 I am getting below errors.
Package "@ionic/angular" has an incompatible peer dependency to "@angular-devkit/core" (requires "7.2.1 - 8", would install "9.0.1").
Package "@ionic/angular" has an incompatible peer dependency to "@angular-devkit/schematics" (requires "7.2.1 - 8", would install "9.0.1").
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.
Updating with force is proper way or should I wait for it. My ionic/angular version is as below.
"@ionic/angular": "^4.7.1",
Solution
Although running the following commands will upgrade you to Ionic 5 + Angular 9 (without the npm warning that you are getting):
npm install @ionic/angular@latest @ionic/angular-toolkit@latest
Next, run the following command. Like @Tinaira mentioned (in the comment), commit/stash any changes before running this command.
ng update @angular/core @angular/cli
(Or pass --allow-dirty to the end of the command if you don't want to commit/stash your changes - NOT RECOMMENDED).
But later on, you might also face another issue of JIT compilation. Check this out Ionic 5 with Angular 9 - Angular JIT compilation failed: '@angular/compiler' not loaded
Answered By - Shashank Agrawal
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.