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

npm process won't exit when the terminal window is closed #15708

Closed
jsoldi opened this issue Jul 14, 2023 · 5 comments
Closed

npm process won't exit when the terminal window is closed #15708

jsoldi opened this issue Jul 14, 2023 · 5 comments
Labels
Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@jsoldi
Copy link

jsoldi commented Jul 14, 2023

Windows Terminal version

1.17.11461.0

Windows build number

10.0.22621.1992

Other Software

npm v9.6.7
node v18.15.0

Steps to reproduce

  1. Create a folder and clone my sample repro: npx degit https://github.com/jsoldi/windows-terminal-bug. It's just a plain server that does nothing.
  2. Do npm install
  3. Open the Windows Terminal on the project folder and run npm start 3000 and then visit localhost:3000 on a browser.
  4. Close the terminal.
  5. Reload localhost:3000 and the server should still be running

If the process actually stops, try repeating steps 3-5 one more time.

Expected Behavior

The process should stop.

Actual Behavior

The process doesn't stop, and I don't know of any way to stop it other than restarting the machine or relogging the user. I've also tried closing the wt from the task manager but that doesn't seem to help.

Notes

I've noticed that the process will actually stop either if I run the script directly with node index.js, or if I do npm start from CMD or PS, so somehow the combination of terminal and npm seems to cause the issue.

@jsoldi jsoldi added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jul 14, 2023
@cs-NET
Copy link

cs-NET commented Jul 14, 2023

Experiencing the same issue, I ended up creating a script to kill all the node processes as a temp workaround as sometimes I have dozens of orphaned node.exe running, might not be the best workaround but beats manually trying to kill each process one at a time:

taskkill /f /im node.exe

@carlos-zamora carlos-zamora added Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Aug 2, 2023
@carlos-zamora carlos-zamora added this to the Backlog milestone Aug 2, 2023
@carlos-zamora
Copy link
Member

carlos-zamora commented Aug 2, 2023

Thanks for filing! We're going to mark this as a /dup of #15373.

The repro steps are fantastic though, so I'll be sure to copy that over :)

@carlos-zamora
Copy link
Member

/dup #15373

@microsoft-github-policy-service
Copy link
Contributor

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service microsoft-github-policy-service bot removed this from the Backlog milestone Aug 2, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. label Aug 2, 2023
@microsoft-github-policy-service
Copy link
Contributor

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

3 participants