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

When running ng version, what does [...] mean?

Open divyang-joshi opened this issue 9 years ago • 4 comments

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Windows 10

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

@angular/cli: 1.0.0-beta.32.3 [1.0.0-beta.30]

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

Run ng version

Mention any other details that might be useful.

  1. Running ng version outside the project returns @angular/cli: 1.0.0-beta.32.3
  2. Running npm list @angular/cli returns @angular/[email protected].

So where is this [1.0.0-beta.30] coming from, or what does it mean? I have a script setup that does a few things based on the versioning but this threw me off.

Edit, the script does do something like this, if there's a version mismatch. So this still happens after uninstall/re-install:

npm uninstall -g angular-cli @angular/cli
npm cache clean && npm install -g @angular/cli@ + supportedVersion
rd /s /q node_modules (delete folders + files)
rd /s /q dist
npm install --save-dev @angular/cli@ + supportedVersion
npm install

divyang-joshi avatar Feb 22 '17 22:02 divyang-joshi

@divyangbw could it be that you still have a reference to angular-cli in your package.json?

beeman avatar Feb 23 '17 07:02 beeman

It might be the version in .angular-cli.json. Try deleting it from the file (yes, it's safe to delete, next version of the CLI will not include it) and see if the version still comes in the output.

Meligy avatar Feb 23 '17 14:02 Meligy

Ah yes, the .angular-cli.json did contain a different version. Changed it, and no more of []. Thanks, guys! Didn't think of looking in the .angular-cli.jsonfile 😁.

Deleting it does, however, set the ng version to output 1.0.0-beta.32.3 [undefined] @Meligy. I'm ok with just having to keep two versions in sync, though.

divyang-joshi avatar Feb 23 '17 19:02 divyang-joshi

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.