Skip to content

Unable to cancel ng serve until it finishes running #19531

@mattlewis92

Description

@mattlewis92

🐞 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, it worked ok with v10

Description

If I run ng serve and hit ctrl + c to cancel, it doesn't do anything until it finishes the build phase it is currently on. Our app is pretty big and takes about 2 minutes to finish building so it's pretty annoying to have to wait for it to finish to cancel. I believe this is caused by the new terminal output introduced in v11 as it wasn't an issue with previous versions of angular.

You can see the issue in the screenshot here, I was hitting ctrl + c repeatedly for over a minute until it finally let me cancel
image

🔬 Minimal Reproduction

It's kind of tricky to make a reproduction for this, but if you open any large app where Generating browser application bundles... will take a while and hit ctrl + c to cance, nothing will happen until the build step completes.

🔥 Exception or Error

N/A

🌍 Your Environment


Angular CLI: 11.0.2
Node: 14.13.1
OS: darwin x64

Angular: 11.0.2
... animations, cli, common, compiler, compiler-cli, core
... elements, forms, language-service, localize
... platform-browser, platform-browser-dynamic, router
... service-worker
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1100.2
@angular-devkit/build-angular   0.1100.2
@angular-devkit/core            11.0.2
@angular-devkit/schematics      11.0.2
@angular/cdk                    9.0.1
@angular/google-maps            11.0.1
@schematics/angular             11.0.2
@schematics/update              0.1100.2
rxjs                            6.6.3
typescript                      4.0.5

Anything else relevant?
I tested on a few different terminal apps and the problem happens on all of them

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions