Typically this is a Warning, it doesn't stop execution of the command, you can ignore and carry on with your work. The intention of the warning is to keep you appraised of the version mismatch.
An example of such an error/warning is
However, there are compatibility issues between certain Angular versions, where this becomes an error and need to be resolved.
An Angular workstation consists of two angular packages
Global CLI |
|
Local CLI |
|
This warning is caused by a version mismatch between global and local angular CLI versions. Version mismatch can arise in either of the two conditions(duh!)
Before we deal with versioning, lets find out what are the local and global versions of Angular CLI by using the following command
ng version
Higher global CLI versions doesn't always support lower versions of local CLI. If you intend to keep using your local angular CLI version, update the global version to your local version as shown below.
Update Local CLI to match Global CLI
ng update ng update @angular/cdk @angular/cli @angular/core @angular/material etc...
On the contrary if you want to keep using the local Angular CLI version and don't want to the bothered, you can update Global CLI to match the Local Angular CLI version as shown below.
Update Global CLI to match Local CLI
npm install --save @angular/cli@localVersion
In case you have multiple applications with varied versions and you want to keep them that way
Warning Case: Conveniently ignore the warning, "Global Angular CLI version greater than local version". Update your global CLI to the latest version while ensuring that all your projects are supported by their local versions. Tutorial to Install/Update Angular CLI.
Error Case: If there are compatibility issues between the varied versions you are using with the global CLI version