Reputation: 145
I wanted to update my angular project and I used the following commands.
$ ng update @angular/core@9 @angular/cli@9
$ ng update @angular/core @angular/cli
but after executing the last command line in console it throws the following error.
Your global Angular CLI version (10.0.0) is greater than your local
version (9.1.9). The local Angular CLI version is used.
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
The installed local Angular CLI version is older than the latest stable version.
Installing a temporary version to perform the update.
Installing packages for tooling via npm.
Installed packages for tooling via npm.
Using package manager: 'npm'
Collecting installed dependencies...
Found 40 dependencies.
Fetching dependency metadata from registry...
Package "@ng-select/ng-option-highlight" has an incompatible peer dependency to "@angular/core" (requires "^8.0.3" (extended), would install "10.0.0").
Package "@ng-select/ng-select" has an incompatible peer dependency to "@angular/forms" (requires ">=8.0.0 <9.0.0"
(extended), would install "10.0.0").
Package "@ng-select/ng-option-highlight" has an incompatible peer dependency to "@angular/common" (requires "^8.0.3" (extended), would install "10.0.0").
× 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\jfhh\AppData\Local\Temp\ng-riDjkX\angular-errors.log" for further details.
Upvotes: 1
Views: 3277
Reputation: 289
The incompatible peer dependencies error can be removed by adding suffix --force i.e. using below command
ng update @angular/core @angular/cli --force
Upvotes: 2