Incompatible peer dependencies found - upgrading Angular from 8 to 9

Looks like you glanced over one of the errors:

Package "@ngtools/webpack" has an incompatible peer dependency to "typescript" (requires ">=3.4 < 3.6", would install "3.7.5").

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

Alternatively, update your TypeScript version in the package.json to 3.7.5 and run npm update, then you should be able to update @angular/core & @angular/cli.


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

This will upgrade the packages anyway, and you can verify your app with the updated dependencies. If that third party dependency still needs to be updated because of breaking changes, then that package will need to be updated.


ng update @angular/core @angular/cli --force might be needed with the --force flag, see an original answer of an Angular core member.

Tags:

Angular