angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Your global Angular CLI version is greater than your local

Open probert94 opened this issue 9 years ago • 23 comments

Bug Report or Feature Request (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request

Versions.

Windows 10 x64 Node 8.5.0 Angular CLI 1.5.0

Repro steps.

  1. Create project with older CLI-Version (in my case 1.3.1).
  2. Update CLI-Version (in my case to 1.5.0).
  3. Run ng --version in a folder outside the 1.3.1-Project.

The log given by the failure.

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

To disable this warning use "ng set --global warnings.versionMismatch=false". @angular/cli: 1.3.1 node: 8.5.0 os: win32 x64

Desired functionality.

The ng-commands should only use a local version, if I am inside a cli-project.
Anywhere else it should use the global (1.5.0) version.

Mention any other details that might be useful.

I have multiple CLI-Projects with different versions (most of them are older test projects which I did not update) in different locations on the hard drive.
For some reason the ng-commands (ng -v, ng new etc.) take one of the locally installed cli-versions, no matter in which folder I execute it.
I couldn't even find which "local" version it used.
Running where ng only returned the global installation under AppData\Roaming.
Reinstalling cli (npm uninstall -g @angular/cli, npm cache clear --force, npm install @angular/cli) did not solve the issue for me.

Am I missing something or is this a bug?

probert94 avatar Nov 02 '17 10:11 probert94

i have installed version angular 7 globally from command prompt, but the project which i'm using version is angular 5, so how to make this project from v.5 to v.7.... , help me out this plz

Karthik-Sharavana avatar Dec 18 '18 08:12 Karthik-Sharavana

You have to migrate this Project to Angular 7. You can find out how to do that on https://update.angular.io

probert94 avatar Dec 18 '18 10:12 probert94

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.