angular-cli: Running "ng update" does nothing and never finishes

Versions

Angular CLI: 6.0.0
Node: 10.0.0
OS: win32 x64
Angular: 5.2.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.6.0
@angular-devkit/core         0.6.0 (cli-only)
@angular-devkit/schematics   0.6.0 (cli-only)
@angular/cli                 6.0.0
@schematics/angular          0.6.0 (cli-only)
@schematics/update           0.6.0
rxjs                         5.5.6
typescript                   2.6.2

Repro steps

  • Update cli from 1.6.3 npm install @angular/cli@6.0.0
  • Update node to 10 as only had 8.4 installed
  • run ng update

Observed behavior

Blinking cursor. No output. I waited 5 minutes and nothing happened. Had to Ctrl + C to quit.

Desired behavior

Should execute the command or give an error message.

Mention any other details that might be useful (optional)

I can see lots of Node.js processes being created in task manager Is there a way to run more verbose output?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 10
  • Comments: 33 (2 by maintainers)

Most upvoted comments

Hmmm actually it did eventually finish. Just took a really long time, like 10 minutes. I’ll leave this open for a little bit in case anyone wants to chime in.

@britvik The improved update logic is present in the latest version of the CLI until it is updated the old logic will be used so the behavior described would be expected.

Looks like there is some traction here, I’ll re open the issue to get more visibility.

Updating the @angular/cli to match the global version does help. However, you need some modifications provided with ng update and that still takes about 20-30 minutes on a very good computer. There is no output or signs that it is running. After a couple of minutes, we have good reasons to think that the command just takes up memory and won’t do nothing, then kill it to try something else.

Eventually, the update will end, then it might say that it ended in errors. To fix those errors, you need to overcome many updates that are equally painful to do. I don’t know what the team thinks about that, but I won’t call it poor performance. I would call it poor experience as well. This seems to be broken thread management, since there is no way it would take up to 20-30 minutes to generate a config file (like angular.json). If there is that much stuff to do during that time, any sign of progression or work would be needed to make this command more useable.

@Swellenator are you sure that the issue is resolved on your end? If so, how did you manage to get it to work faster? If there is a need to go in a linux environment for decent-sized projects, that proves the point: broken on Windows. The team should see this as an active issue. Thanks!

Still an issue. Running ng update @angular/cli @angular/core (or 1 by 1) did not finish in several minutes. But after I updated angular/cli manually (7.1.0 -> 7.2.1) then ng update @angular/core finished in a few seconds.

I just changed the @angular/cli version number in package.json to match my global version and it resolved the issue

I’ve been running ng update @angular/cli for about 15 minutes so far on my 8 core skylake i7. Seems like an unreasonable period of time to have to wait imho. In general I’m leaning more towards react if I get to be the decision maker on upcoming projects because while angular is a joy to work with it has massive bloat and slow compilation and as a JS dev I like things slick, modular and compact.

err, I needed to remove the reference to @angular/cli from my package.json, then run npm i -D @angular/cli then run update. For future readers: If you get a warning saying cli versions do not match, you need to make sure both the global and local cli version are 6.x

I am facing the same problem. “ng update” finishes, but takes close to 10 minutes. During this time my computer (with Windows 10 x64) slows to a crawl.

“System” and “Antimalware Service Executable” CPU usage also increase during update. task manager

Seems like it creates tens of sub-processes which slow down the entire system (tested with cli 6.0.3 on node 8.11.1 / win10 x64)