angular-waring: global Angular and local Angular version inconsistencies

 

The following warning after the start angular project

 

According waring information point of view, it should be a local version of the global angular angular version inconsistencies caused.

There are two solutions:
a local version closer to the global version of
the global version closer to the local version

Move closer to the local version of the global version

Uninstall the current version of the project:

npm uninstall -g @angular/cli

Clear cache to ensure a clean uninstall (remove command cache used in earlier versions of nodejs inside npm cache clean):

npm cache verify

Install the latest version:

npm install --save-dev @angular/cli@latest

Install / Update depend on:

npm install

View Version:

ng -v

The global version closer to the local version

 Global uninstall the current version:

npm uninstall -g @angular/cli

Install the specified version (waring prompt, the project configuration file can also view):

npm install -g @angular/[email protected]

Installing the re-run, there is no warning of this.

Guess you like

Origin www.cnblogs.com/wyw-blog/p/11818328.html