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

Created on 4 May 2018  ·  33Comments  ·  Source: angular/angular-cli

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/[email protected]
  • 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?

schematicupdate medium memorperformance triage #1

Most helpful comment

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.

All 33 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.

Well I suppose ng update is just painfully slow. Would be good to improve the performance.

Well, mine is still hanging after like 10mins and I wonder if it ever will. Some progress update into the command line would be handy....

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)

It takes upwards of 15 minutes for my projects on a very beefy workstation, but in my case it might be interacting poorly with some enterprise security software.

just like @urish said, on windows 10 x64 i opened for me about 10 terminals and lot of node processed that consume memory but does not consume cpu !!, and it causes the whole system to be really slow,
i take more than 20 mins and did not finish !!

I am facing exactly the same problem.

Why is this issue closed?
Is there any solution?

I cant get it to work.

Ended up editing the package.json manually and do npm install.
But this wont change the angular-cli.JSON

@plaetzchen79
I copied the project to linux machine, did the update there and moved it back to windows

Sadly Linux is no option for me.

But this morging i ran "ng update" again.
I dont know exactly how long (I went to the coffee machine and did something else) but after a long while the command finished without errors.

Ok- be patient and let the computer work..
Like in the 80ies ;-)

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

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'm trying to do this with my co-developer and currently it's still on-going update. Time check, 30 mins and still updating. cheers

@aydun1 @thekingspaghettie What i suggest to workaround this issue for now, it to copy the project to linux environment, do the install/update there then copy the whole folder with the node modules

Yea. This will do. Anyway, I'm just trying it.

On Thu, Jun 28, 2018 at 3:38 PM, Ihab Zhaika notifications@github.com
wrote:

@aydun1 https://github.com/aydun1 @thekingspaghettie
https://github.com/thekingspaghettie What i suggest to workaround this
issue for now, it to copy the project to linux environment, do the
install/update there then copy the whole folder with the node modules


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/angular/angular-cli/issues/10622#issuecomment-400941825,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AiOKwGHjaPtxPBHMLGNoc6kLNx8yslk5ks5uBIfmgaJpZM4Tx-a2
.

Me too, I thought it will install the package. But after an 1hr there's no
result still fetching.

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

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!

I also experienced this issue when upgrading from Angular 5 to Angular 6. On my internet connection i.e. 2 MB/s it took half an hour but no result and then I increased my internet speed to 50 - 60 (MB/s) at this speed it took hardly 5 - 10 mins to run update command. Overall ng update is working but it seems that nothings happening so wait and let NG do its work. Hope it help you 👍

Running ng update @angular/cli @angular/core from Angular 6.1 to 7.0 took closer to 30 minutes for me on my work connection.

Running ng update @angular/cli @angular/core from Angular 6.1 to 7.0 took closer to 30 minutes for me on my work connection.

Vote up, I have the same issue

I had to do this twice! angular.json did not get created until the second run. Each run took ~40mins! and it appeared to do nothing for the first 35mins! Is it doing battle with my anti-virus??

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

Well, what I can say, it works but takes every time ~30 minutes to update.

i'm having the same issue when updating from angular 6.1 to 7. running node.js 10.13. ng update @angular/cli @angular/core, is going for 30+ minutes and no sign of life yet.

edit: it finished without any errors eventually, just takes incredibly long without any visual sign of work in progress.

same issue. It is not updating. npm update does the work.

same issue. It is not updating. npm update does the work.

try to wait for approximately 30 or 40 minutes. I works, but the issue is time of waiting

i was getting Unexpected token < in JSON at position 0 when trying to upgrade

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.

@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.

I have this problem too. Even I add the --verbose flag it shows just "Package not installed: "--verbose=true". Skipping." and seems to run forever.

This post is bit old but for someone who face the same issue I thought to post this.
I faced the same issue and what I did was;

  1. Open command line window with admin rights and navigate to project location
  2. Install latest cli globally using npm install -g @angular/cli (using command line with administraor rights)
  3. Update the package.json cli version to have the same version as globally installed CLI.
  4. Run npm install to update new version CLI locally
  5. Remove or stash local changes done(CLI version or any thing)
  6. Run ng update @angular/cli@^7 @angular/core@^7.

Probably if you know the latest CLI version you may skip first two steps and try. Probably it might do.

You should see changes similar to below in package.json

From
"@angular/animations": "^6.1.10",
"@angular/common": "^6.1.10",
"@angular/compiler": "^6.1.10",
"@angular/core": "^6.1.10",
"@angular/forms": "^6.1.10",
"@angular/http": "^6.1.10",
"@angular/platform-browser": "^6.1.10",
"@angular/platform-browser-dynamic": "^6.1.10",
"@angular/router": "^6.1.10",
"@angular/compiler-cli": "^6.1.8",
"@angular/language-service": "^6.0.6",
"typescript": "~2.7.2"

To

"@angular/animations": "^7.2.15",
"@angular/common": "^7.2.15",
"@angular/compiler": "^7.2.15",
"@angular/core": "^7.2.15",
"@angular/forms": "^7.2.15",
"@angular/http": "^7.2.15",
"@angular/platform-browser": "^7.2.15",
"@angular/platform-browser-dynamic": "^7.2.15",
"@angular/router": "^7.2.15",
"@angular/compiler-cli": "^7.2.15",
"@angular/language-service": "^7.2.15",
"typescript": "~3.2.4"

I'm sorry, but we can't reproduce the problem following the instructions you provided.
Remember that we have a large number of issues to resolve, and have only a limited amount of time to reproduce your issue.

A good way to make a minimal repro is to create a new app via ng new repro-app and add the minimum possible code to show the problem. Then you can push this repository to github and link it here.

If the problem persists, please open a new issue following our submission guidelines.

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._

Was this page helpful?
0 / 5 - 0 ratings