Skip to content

ng update: The specified command update is invalid. #9408

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
makc opened this issue Jan 26, 2018 · 10 comments
Closed

ng update: The specified command update is invalid. #9408

makc opened this issue Jan 26, 2018 · 10 comments

Comments

@makc
Copy link

makc commented Jan 26, 2018

what is current equivalent of ng update? because it does not work; I followed #4679 and got this message, another issue #4304 with the same problem was just closed with no explanation. can we please get some of that, explanation?

screen shot 2018-01-26 at 21 51 46

@makc
Copy link
Author

makc commented Jan 26, 2018

from this
screen shot 2018-01-26 at 22 02 26
it looks like the command was removed 🤔 so how do we update the app now?

@ahnpnl
Copy link

ahnpnl commented Jan 27, 2018

I don't see this command on official doc either, look like it was removed

@filipesilva
Copy link
Contributor

There isn't such a command anymore, you can read more about this in #4584.

@philippludwig
Copy link

philippludwig commented May 22, 2018

For everyone else getting stuck here, the correct update command now seems to be: npm install --save-dev @angular/cli@latest

@Shaphil
Copy link

Shaphil commented May 28, 2018

After issuing the npm install --save-dev @angular/cli@latest command I was presented with this:

npm WARN notice [SECURITY] ws has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=ws&version=1.1.2 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] sshpk has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=sshpk&version=1.13.1 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] stringstream has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=stringstream&version=0.0.5 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] debug has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=debug&version=2.3.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] debug has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=debug&version=2.3.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] debug has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=debug&version=2.3.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] debug has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=debug&version=2.2.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] randomatic has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=randomatic&version=1.1.7 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] parsejson has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=parsejson&version=0.0.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] https-proxy-agent has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=https-proxy-agent&version=1.0.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] lodash has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=lodash&version=4.17.4 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] lodash has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=lodash&version=3.10.1 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] hoek has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=hoek&version=2.16.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.

> @angular/[email protected] postinstall C:\PlayGround\angular\sunshine\node_modules\@angular\cli
> node ./bin/ng-update-message.js


================================================================================
The Angular CLI configuration format has been changed, and your existing configuration can
be updated automatically by running the following command:

  ng update @angular/cli
================================================================================

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ @angular/[email protected]
added 614 packages in 44.183s

There is an ng update @angular/cli suggestion near the end.

running ng -v on my machine produces the following:

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


Angular CLI: 6.0.5
Node: 8.11.1
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.6.5
@angular-devkit/core         0.6.5
@angular-devkit/schematics   0.6.5
@schematics/angular          0.6.5
@schematics/update           0.6.5
rxjs                         6.2.0
typescript                   2.7.2

@marcj
Copy link

marcj commented May 28, 2018

Wait, what? Since when has this been removed? The official update guide at https://update.angular.io/ stills shows it.

screen shot 2018-05-28 at 20 23 04

@SiddAjmera
Copy link

Was getting the same error. So I then ran npm install --save-dev @angular/cli@latest

And after that, when I ran ng update @angular/cli, it automatically created angular.json, deleted .angular-cli.json and updated karma.conf.js, src/tsconfig.spec.json, package.json, and tslint.json

image

@ryanki1
Copy link

ryanki1 commented Jul 10, 2018

screen shot 2018-07-10 at 14 37 23
Still get command update is invalid :-(

@AdamShechter9
Copy link

AdamShechter9 commented Aug 13, 2019

Was following 'Angular Update Guide | 5.2 -> 6.1 for Medium Apps' on update.angular.io

had to update my node version to 10.9.0 after upgrading the CLI.
Screen Shot 2019-08-13 at 14 35 04

now I'm getting this error:

`=> ng update @angular/cli
Your global Angular CLI version (8.2.1) is greater than your local
version (1.6.7). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
The specified command update is invalid. For available options, see ng help.
`

@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 Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants