Skip to content

14.0.5 not installed globaly #23518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 15 tasks
sysmat opened this issue Jul 7, 2022 · 2 comments · Fixed by #23520
Closed
1 of 15 tasks

14.0.5 not installed globaly #23518

sysmat opened this issue Jul 7, 2022 · 2 comments · Fixed by #23520
Labels
area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix

Comments

@sysmat
Copy link

sysmat commented Jul 7, 2022

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, the previous version installed correctly

Description

I'm not in any workspace

  1. npm uninstall -g @angular/cli
  2. npm cache verify
  3. npm install -g @angular/cli
  4. ng version
❯ ng version
Your global Angular CLI version (14.0.5) is greater than your local version (13.3.7). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".

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


Angular CLI: 13.3.7
Node: 16.15.1
Package Manager: npm 8.5.1
OS: win32 x64

Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1303.7
@angular-devkit/core         13.3.7
@angular-devkit/schematics   13.3.7
@schematics/angular          13.3.7
  1. ng config -g cli.warnings.versionMismatch false
Your global Angular CLI version (14.0.5) is greater than your local version (13.3.7). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Schema validation failed with the following errors:
  Data path "/cli" must NOT have additional properties(completion).
  1. which ng
/c/Users/tomaz/AppData/Roaming/npm/ng
  1. in C:\Users\tomaz\AppData\Roaming\npm\node_modules@angular\cli\package.json I see
"name": "@angular/cli",
  "version": "14.0.5",
  "description": "CLI tool for Angular",
  "main": "lib/cli/index.js",
  "bin": {
    "ng": "./bin/ng.js"
  },
  1. ng completion
The specified command ("completion") is invalid. For a list of available options,
run "ng help".

Did you mean "analytics"?
@alan-agius4
Copy link
Collaborator

There are two main issues errors here and both of which are caused by incompatibilities between v14 and v13 Angular CLI.

  1. cli.completion property was not allowed in the Angular CLI version 13 and therefore when trying to set the config from a v13 workspace it will issue an error. Workaround for this is to run the command from outside the v13 workspace.
  Data path "/cli" must NOT have additional properties(completion).
  1. CLI version 13, doesn't support completion, in this case we should either disable completion or use the global CLI.
The specified command ("completion") is invalid. For a list of available options.

@alan-agius4 alan-agius4 added severity3: broken area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely type: bug/fix labels Jul 7, 2022
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jul 7, 2022
…nning in an older CLI workspace

Previously when having completion enabled and the current workspaces has an older version of the Angular CLI installed in the terminal the below errors is show. This is because the older versions of the CLI do not implement this command. Now we favor the global version if it's greater than the local version of the CLI.

```
The specified command ("completion") is invalid. For a list of available options,
run "ng help".

Did you mean "analytics"?
```

Closes angular#23518
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jul 7, 2022
…nning in an older CLI workspace

Previously when having completion enabled and the current workspaces has an older version of the Angular CLI installed in the terminal the below errors is show. This is because the older versions of the CLI do not implement this command. Now we favor the global version if it's greater than the local version of the CLI.

```
The specified command ("completion") is invalid. For a list of available options,
run "ng help".

Did you mean "analytics"?
```

Closes angular#23518
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jul 7, 2022
…nning in an older CLI workspace

Previously when having completion enabled and the current workspaces has an older version of the Angular CLI installed in the terminal the below errors is show. This is because the older versions of the CLI do not implement this command. Now we exit gracefully.

```
The specified command ("completion") is invalid. For a list of available options,
run "ng help".

Did you mean "analytics"?
```

Closes angular#23518
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jul 7, 2022
…nning in an older CLI workspace

Previously when having completion enabled and the current workspaces has an older version of the Angular CLI installed in the terminal the below errors is show. This is because the older versions of the CLI do not implement this command. Now we exit gracefully.

```
The specified command ("completion") is invalid. For a list of available options,
run "ng help".

Did you mean "analytics"?
```

Closes angular#23518
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jul 7, 2022
…nning in an older CLI workspace

Previously when having completion enabled and the current workspaces has an older version of the Angular CLI installed in the terminal the below errors is show. This is because the older versions of the CLI do not implement this command. Now we exit gracefully.

```
The specified command ("completion") is invalid. For a list of available options,
run "ng help".

Did you mean "analytics"?
```

Closes angular#23518
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jul 7, 2022
…g in an older CLI workspace

Previously when having completion enabled and the current workspaces has an older version of the Angular CLI installed in the terminal the below errors is show. This is because the older versions of the CLI do not implement this command. Now we exit gracefully.

```
The specified command ("completion") is invalid. For a list of available options,
run "ng help".

Did you mean "analytics"?
```

Closes angular#23518
alan-agius4 added a commit that referenced this issue Jul 7, 2022
…g in an older CLI workspace

Previously when having completion enabled and the current workspaces has an older version of the Angular CLI installed in the terminal the below errors is show. This is because the older versions of the CLI do not implement this command. Now we exit gracefully.

```
The specified command ("completion") is invalid. For a list of available options,
run "ng help".

Did you mean "analytics"?
```

Closes #23518

(cherry picked from commit 2731fe7)
alan-agius4 added a commit that referenced this issue Jul 7, 2022
…g in an older CLI workspace

Previously when having completion enabled and the current workspaces has an older version of the Angular CLI installed in the terminal the below errors is show. This is because the older versions of the CLI do not implement this command. Now we exit gracefully.

```
The specified command ("completion") is invalid. For a list of available options,
run "ng help".

Did you mean "analytics"?
```

Closes #23518
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Projects
None yet
2 participants