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
Nodemon doesn't wait for async graceful exit handlers #2117
Comments
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
This is definitely not stale, it's a real pain when running our webserver in dev mode, and it keeps messing with my terminal. |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
Still not fixed, please keep open. |
I've just been giving this a test, and without i.e. globally installed, or called directly. The problem, I'm guessing, is that the signal is caught by I'm not sure what to do here since it's outside of nodemon that the exit to shell is occurring, unless you have any suggestions? (I'd say this is a "not a bug", but it's definitely annoying, I can see that). |
Huh. That's interesting. I get the same result. Running Since And before someone suggests "just run nodemon directly then", all the places we call nodemon are in npm scripts in our package.json. Refactoring that is not really an option for us. |
Having the same issue!
It just hangs in there and the process never gets closed! Workaround: |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
Please don't close <3 |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
Don't close yet please! |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
Still an issue, please don't close! |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
Don't close please. |
So the problem is down to the use of npx - as described in an earlier comment. Nodemon can only (currently) offer documented work around - unless someone has a code fix? I can add it to the faq... |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
Automatically closing this issue due to lack of activity |
node@v18.14.0
,darwin@22.5.0
nodemon -v
: 2.0.22npx nodemon hello.js
Expected behaviour
The process should keep running in the foreground until the
shutdown
handler is finished.Actual behaviour
The process continues in the foreground until the first
await
, then "soft exists" (causes the terminal prompt to be displayed), but doesn't kill the process.Screen.Recording.2023-06-21.at.10.40.23.AM.mov
Steps to reproduce
Run this file via nodemon, then
ctrl+c
it to shut it down:The text was updated successfully, but these errors were encountered: