Skip to content
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

Angular 13 CLI not stopping after ctrl + c #22216

Closed
1 of 15 tasks
danielehrhardt opened this issue Nov 22, 2021 · 7 comments · Fixed by #23438 or #23457
Closed
1 of 15 tasks

Angular 13 CLI not stopping after ctrl + c #22216

danielehrhardt opened this issue Nov 22, 2021 · 7 comments · Fixed by #23438 or #23457
Assignees
Labels
2022Q3 Fixit Candidates for the Q3 2022 fix-it area: devkit/build-angular devkit/build-angular:dev-server freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix
Milestone

Comments

@danielehrhardt
Copy link

danielehrhardt commented Nov 22, 2021

🐞 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, the previous version in which this bug was not present was: v 12

Description

With Angular 13 i have on Windows and Mac the Problem that the ng:serve command does not stop after i press ctrl + c.
After i press ctrl+c in the Terminal the Angular CLI still produce cli output.

🔬 Minimal Reproduction

npm start
press ctrl+c or command+c
wait a bit and see the console output in the Terminal.

🔥 Exception or Error





🌍 Your Environment




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

Angular CLI: 13.0.2
Node: 16.13.0
Package Manager: yarn 1.22.17
OS: darwin arm64

Angular: 13.0.1
... animations, cdk, common, compiler, compiler-cli, core, forms
... material, platform-browser, platform-browser-dynamic
... platform-server, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1300.2
@angular-devkit/build-angular   13.0.2
@angular-devkit/core            13.0.2
@angular-devkit/schematics      8.3.29
@angular/cli                    13.0.2
@nguniversal/builders           13.0.1
@nguniversal/express-engine     13.0.1
@schematics/angular             13.0.2
rxjs                            7.4.0
typescript                      4.4.4

Anything else relevant?

@alan-agius4
Copy link
Collaborator

alan-agius4 commented Nov 23, 2021

This is related/caused by sindresorhus/ora#156 and unfortunately there is no easy way to address this.

Note: the build will be cancelled, but it with a delayed.

@johannesnormannjensen
Copy link

Experiencing the same thing with both build and serve.

If I try to stop the process with Ctrl + c in phase: setup it looks like the process stopped until it suddenly reaches phase: building

@alan-agius4 alan-agius4 added area: devkit/build-angular freq1: low Only reported by a handful of users who observe it rarely severity2: inconvenient type: bug/fix labels Nov 25, 2021
@ngbot ngbot bot added this to the Backlog milestone Nov 25, 2021
@spock123
Copy link

spock123 commented Nov 26, 2021

Same issue here. Sometimes the process doesn't die properly, so builds fail due to an ongoing ngcc process already running. I don't know if this helps but I don't recall this to be an issue in ng12.

@Th3CracKed
Copy link

Th3CracKed commented Dec 15, 2021

I experienced the same issue with ng serve

@danielehrhardt
Copy link
Author

danielehrhardt commented Jun 18, 2022

Still present with Angular 14 and on Mac

@mpumford
Copy link

Not specific to windows. Happens with ng serve and ng build on linux as well (Ubuntu 18)

For a production build the delay can be quite long so this is more than irritating.

@alan-agius4 alan-agius4 self-assigned this Jun 24, 2022
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jun 27, 2022
…essed

Since version 4, webpack-dev-server by default will shutdown gracefully. This results in `CTRL+C` needed to be pressed multiple times to exit the process.

See: https://github.com/webpack/webpack-dev-server/blob/c76b6d11a3821436c5e20207c8a38deb6ab7e33c/lib/Server.js#L1801-L1827

Closes angular#22216
clydin pushed a commit that referenced this issue Jun 27, 2022
…essed

Since version 4, webpack-dev-server by default will shutdown gracefully. This results in `CTRL+C` needed to be pressed multiple times to exit the process.

See: https://github.com/webpack/webpack-dev-server/blob/c76b6d11a3821436c5e20207c8a38deb6ab7e33c/lib/Server.js#L1801-L1827

Closes #22216
clydin pushed a commit that referenced this issue Jun 27, 2022
…essed

Since version 4, webpack-dev-server by default will shutdown gracefully. This results in `CTRL+C` needed to be pressed multiple times to exit the process.

See: https://github.com/webpack/webpack-dev-server/blob/c76b6d11a3821436c5e20207c8a38deb6ab7e33c/lib/Server.js#L1801-L1827

Closes #22216

(cherry picked from commit 4fcfc37)
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jun 28, 2022
…is pressed

When using localization we setup `SIGINT` signal to delete the temporary directory. In some cases these resulted in delaying the process from exiting a couple of seconds.

Closes angular#22216
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jun 28, 2022
…is pressed

When using localization we setup `SIGINT` signal to delete the temporary directory. In some cases this resulted in delaying the process from exiting a couple of seconds.

Closes angular#22216
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jun 28, 2022
… is pressed

When using localization we setup `SIGINT` signal to delete the temporary directory. In some cases this resulted in delaying the process from exiting a couple of seconds.

Closes angular#22216
clydin pushed a commit that referenced this issue Jun 28, 2022
… is pressed

When using localization we setup `SIGINT` signal to delete the temporary directory. In some cases this resulted in delaying the process from exiting a couple of seconds.

Closes #22216

(cherry picked from commit 2b96254)
clydin pushed a commit that referenced this issue Jun 28, 2022
… is pressed

When using localization we setup `SIGINT` signal to delete the temporary directory. In some cases this resulted in delaying the process from exiting a couple of seconds.

Closes #22216
@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 Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.