3

Please check with my below error and can any please help me out

Your global Angular CLI version (6.1.2) is greater than your local version (1.5.0). The local Angular CLI version is used ?

My Local Verions are :-
_ _ ____ _ _ / \ _ __ __ _ _ _| | __ _ _ __ / | | | | / △ \ | ' \ / _| | | | |/ _ | '| | | | | | | / \| | | | (| | || | | (| | | | || | | | // __| ||__, |__,||__,|| ____|_____|| |/

Angular CLI: 1.5.0
Node: 8.11.3
OS: win32 ia32
Angular: 5.0.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

@angular/cdk: 5.0.0-rc0
@angular/cli: 1.5.0
@angular/flex-layout: 2.0.0-beta.10-4905443
@angular/material: 5.0.0-rc0
@angular/service-worker: 5.2.5
@angular-devkit/build-angular: error
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.0
typescript: 2.5.3
webpack: 3.8.1





My Global Versions are :- 

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 6.1.2
Node: 8.11.3
OS: win32 ia32
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.7.2
@angular-devkit/core         0.7.2
@angular-devkit/schematics   0.7.2
@angular/cli                 6.1.2
@angular/service-worker      1.0.0-beta.16
@schematics/angular          0.7.2
@schematics/update           0.7.2
rxjs                         6.2.2
typescript                   3.0.1
user1455879
  • 141
  • 1
  • 7
  • There is no error here. What is your issue? – henrikmerlander Aug 07 '18 at 05:43
  • If you don’t intend to upgrade your project to angular 6+, then perhaps downgrading your global angular-cli would be a good idea. But perhaps you should use the latest stable version before 6 (1.7.3?). – Ben Steward Aug 07 '18 at 05:43
  • Possible duplicate of [Global Angular CLI version greater than local version](https://stackoverflow.com/questions/44525746/global-angular-cli-version-greater-than-local-version) – Tim Martens Aug 07 '18 at 05:52

3 Answers3

4

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

K. Ayoub
  • 406
  • 1
  • 5
  • 15
1

for this warning you have to update angular cli version

i suggest you refer angular official site to update version Refer below link -

https://update.angular.io/

In above link you have to select current version and update version.

with this command - npm install --save-dev @angular/cli@latest you can just update cli version to latest, but if you are using latest angular version than also needed some other configuration changes and packages related changes like RxJs, so prefer above link for update would be good for you application

Because when you are updating angular cli to version 6, than you must have to update rxjs and setup with tsconfig.

So, it will better to follow all the steps which are provide in above link to upgrade perfect without any unnecessary errors.

Thanks

Kaushik Andani
  • 1,252
  • 1
  • 14
  • 22
0

Two ways to solve this global and local angular CLI version issue.
1. Keep a specific angular-cli version for both environments.
2. Goto latest angular-cli version for both environments.

1. Specific angular-cli version (use when working with existing application)

First, find out which angular version you want to keep on the global and local environment.

ng --version

for example: here we keeping local angular CLI version 5.0.1

So, we have to change the global version also on 5.0.1. use cmd>

npm install --save-dev @angular/cli@5.0.1 -g

here, '-g' flag for a set global angular-cli version.

2. Goto latest angular version for both CLI environment.(use when creating new application)

npm install --save-dev @angular/cli@latest -g  
npm install --save-dev @angular/cli@latest 
Surendranath Sonawane
  • 1,595
  • 1
  • 18
  • 24