Skip to content

Backwards warning that global CLI is greater version than local CLI  #4337

Closed
@tobymurray

Description

@tobymurray

OS?

Windows 10

Versions.

angular-cli: 1.0.0-beta.28.3
node: 7.5.0
os: win32 x64
yarn 0.21.0-20170202.0141

Repro steps.

In Windows Command Prompt without administrative privileges,

yarn add global angular-cli
...
<install proceeds as expected>
...
ng --version
Your global Angular CLI version (1.0.0-beta.26) is greater than your local version (1.0.0-beta.28.3). The local Angular CLI version is used.

                             _                           _  _
  __ _  _ __    __ _  _   _ | |  __ _  _ __         ___ | |(_)
 / _` || '_ \  / _` || | | || | / _` || '__|_____  / __|| || |
| (_| || | | || (_| || |_| || || (_| || |  |_____|| (__ | || |
 \__,_||_| |_| \__, | \__,_||_| \__,_||_|          \___||_||_|
               |___/
angular-cli: 1.0.0-beta.28.3
node: 7.5.0
os: win32 x64

Ignoring the somewhat garish ASCII art, emphasis on the warning here:
Your global Angular CLI version (1.0.0-beta.26) is greater than your local version (1.0.0-beta.28.3)

Mention any other details that might be useful.

Looks like maybe the code was added here, so perhaps a bug in 566fbc5?

I had thought I had uninstalled everything - Yarn and NPM, as well as cleared both caches before reinstalling Node, Yarn, and Angular. I didn't realize I had a package.json in the directory I was executing the command (did something drop it there during the install?). Upon deleting the package.json and re-executing the command, I get the same result, so I'm not sure how it's discovering the local version.

// package.json
{
  "dependencies": {
    "angular-cli": "^1.0.0-beta.28.3",
    "global": "^4.3.1"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions