Skip to content

'ng serve' and 'ng build' hang with 100% CPU when updating Angular v19 to v20 to docker #31269

@Trystan-SA

Description

@Trystan-SA

Which @angular/* package(s) are the source of the bug?

compiler

Is this a regression?

Yes

Description

I tried to update my angular application from v19.x to v20.3. I'm angular using docker as a dev server. Since updating my angular packages. The 'ng serve' and 'ng build' tasks hang indefenitly and the server never start when spawing it from a docker container. Everything work well if I start it directly on my host.

List of updated packages :

 "@angular-devkit/architect": "0.1901.4", --> "^0.2003.2"
    "@angular-devkit/build-angular": "19.1.4", --> "^20.3.2"
    "@angular-devkit/core": "19.1.4", --> "^20.3.2"
    "@angular-devkit/schematics": "19.1.4", --> "^20.3.2"
    "@angular/animations": "19.2.14", --> "^20.3.1"
    "@angular/build": "^19.2.14", --> "^20.3.2"
    "@angular/cdk": "19.2.14", --> "^20.2.4"
    "@angular/cli": "~19.0.0", --> ""^20.3.2"
    "@angular/common": "19.2.14", --> "^20.3.1"
    "@angular/compiler": "19.2.14", --> "^20.3.1"
    "@angular/compiler-cli": "19.2.14", --> "^20.3.1"
    "@angular/core": "19.2.14", --> "^20.3.1"
    "@angular/forms": "19.2.14", --> "^20.3.1"
    "@angular/language-service": "19.2.14", --> "^20.3.1"
    "@angular/platform-browser": "19.2.14", --> "^20.3.1"
    "@angular/platform-browser-dynamic": "19.2.14", --> "^20.3.1"
    "@angular/router": "19.2.14", --> "^20.3.1"
    "@angular/service-worker": "^19.2.14", --> "^20.3.1"
    "@sentry/angular": "8.51.0", --> "10.13.0",
    "zone.js": "0.15.0" --> "0.15.1",
    "@analogjs/vite-plugin-angular": "^1.17.1", --> "^1.21.1"
    "@analogjs/vitest-angular": "^1.17.1", --> "^1.21.1"
    "@angular-eslint/eslint-plugin": "19.0.2", --> "20.3.0"
    "@angular-eslint/eslint-plugin-template": "19.0.2", --> "20.3.0"
    "@angular-eslint/template-parser": "19.0.2", --> "20.3.0",
    "@schematics/angular": "19.1.4", -->  "20.3.2",
    "ng-mocks": "14.13.2", --> "14.13.5"
    "ng-packagr": "19.1.0", --> "20.3.0",
    "typescript": "5.6.3", --> "5.9.2"

I tried multiples commands like '--verbose' to get some info about where the ng command hang. But nothing get printed. I'm completly clueless.

I'm running my docker app like this : ng build --verbose --configuration production or ng serve --port 4200 --poll 2000 --host 0.0.0.0 --disable-host-check --live-reload --proxy-config path/to/proxy/config.json

I observe 100% CPU utilization on my docker container (1 core). But it still do nothing after 10 minutes. The dev server on my host (16 core) start in 30 seconds. Any clues how to debug it ?

Thanks a lot !

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw


Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 20.3.2
Node: 22.15.0
Package Manager: npm 10.9.2
OS: linux x64
    

Angular: 20.3.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package                         Version
---------------------------------------
@angular-devkit/architect       0.2003.2
@angular-devkit/build-angular   20.3.2
@angular-devkit/core            20.3.2
@angular-devkit/schematics      20.3.2
@angular/build                  20.3.2
@angular/cdk                    20.2.4
@angular/cli                    20.3.2
@schematics/angular             20.3.2
ng-packagr                      20.3.0
rxjs                            7.8.0
typescript                      5.9.2
webpack                         5.101.3
zone.js                         0.15.1

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions