Search code examples
angularangular-cling-upgradeangular-cli-v7

ng upgrade command fails for upgrading cli from v7 to v8


The ng upgrade command for updating cli version from a v7 project to v8 fails.

Manually trying to upgrade cli first also fails.

ng update @angular/cli

Your global Angular CLI version (8.0.1) is greater than your local version (7.3.9). The local Angular CLI version is used.

Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.1.1 <3.3", would install "3.4.5"). Incompatible peer dependencies found. See above.


Solution

  • try upgrading all packages using ng update --all --force if this doesn't work then try upgrading core and CLI ng update @angular/core @angular/cli.

    and still not working then install typescript manually using npm i [email protected]