Your global Angular CLI version (6.0.8) is greater than your local version (1.0.2)

user9815201 picture user9815201 · Jun 13, 2018 · Viewed 40.2k times · Source
C:\dev\myApp> ng serve -o 
Your global Angular CLI version (6.0.8) is greater than your local version (1.0.2). 
The local Angular CLI version is used.
To disable this warning use `"ng config -g cli.warnings.versionMismatch false"`

I don't know what to do with this.

I tried uninstalling angular/cli and npm cache clean but still have problems.

Anyone help me !

Answer

Poul Kruijt picture Poul Kruijt · Jun 13, 2018

You have the old angular/cli package in your package.json

To update use:

npm r angular-cli
npm i @angular/cli@latest -D

Be aware though, if you have already been using the old cli for a long time, you might have to do some code migration. Especially when it comes to tests, polyfills and the angular config file.

You could try to create an empty angular project using the new cli, and compare the files which are created there, with the files you have in your own project, and update where applicable.

After that, when you have to update your cli again, you can use the new ng update command