Nodemon is not able to gracefully restart applications in Windows environment
See original GitHub issuePossibly related to https://github.com/remy/nodemon/issues/1567
-
nodemon -v
: 6.13.4 -
node -v
: v12.16.1 -
Operating system/terminal environment:
- Windows Command Prompt, Windows Git Bash, Windows Terminal WSL
Edition: Windows 10 Pro Version: 1909 Installed on: 5/22/2019 OS Build: 18363.836
-
Command ran:
nodemon --signal SIGHUP index.js
Expected behaviour
On Windows, Nodemon should wait for the process to complete if it handles a shut down signal.
Notice the
express server closed
message
WSL:
Actual behaviour
The application is killed and restarted right away. This behavior does not exist in Linux, Mac and WSL.
CMD:
Steps to reproduce
I have created a sample Express app here: https://github.com/chriswoodle/nodemon-1567 that shuts down the express server once the application is signaled to stop ['SIGTERM', 'SIGINT', 'SIGHUP']
git clone https://github.com/chriswoodle/nodemon-1567.git
cd nodemon-1567
npm install
npm start
touch index.js
Let me know if I can provide any more information or test changes, thanks.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:50 (24 by maintainers)
Top Results From Across the Web
'nodemon' is not recognized as an internal or external command
'nodemon' is not recognized as an internal or external command # · Open the start search and type in env and then click...
Read more >Port 3000 is already in use [nodemon] app crashed - waiting ...
If your app listens in on SIGTERM to shutdown gracefully when nodemon triggers tskill command, Windows will unconditionally terminate your ...
Read more >nodemon | Yarn - Package Manager
Automatic re-running. nodemon was originally written to restart hanging processes such as web servers, but now supports apps that cleanly exit. If your...
Read more >nodemon - Bountysource
Nodemon is not able to gracefully restart applications in Windows environment $ 0 ... Created 2 years ago in remy/nodemon with 44 comments....
Read more >A Complete Guide to Node.js Process Management with PM2
pm2-dev : a development tool for restarting your application when file ... option to ensure that a graceful shutdown does not take too...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If I get time, I’ll look into this, but I wanted to stop and say:
Thank you for filing an issue with a good level of detail and a good example of pared down code to replicate the issue. I’ll be pointing people to this issue as an example of what makes the world of difference in debugging. 🙏
Still isn’t resolved