nodemon: Nodemon child process not being killed with update to 1.18.0
nodemon -v:1.18.0node -v:v8.11.2- Operating system/terminal environment:
macOS 10.13.5/ZSH - Command you ran:
nodemon --exec npx ...
Expected behaviour
In the previous version (1.17.5), Nodemon would properly kill the child process with ^C
Actual behaviour
After updating to 1.18.0, Nodemon no longer kills the child process and now throws an error:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
Steps to reproduce
Update to 1.18.0 and run a child process like: nodemon --exec npx http-server. Hit control + C. See new error. The http-server will still be running and requires a killall node to exit.
If applicable, please append the --dump flag on your command and include the output here ensuring to remove any sensitive/personal details or tokens.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 5
- Comments: 24 (9 by maintainers)
Commits related to this issue
- fix: send proper quit signal on ctrl-c Fixes #1386 Also sends the correct signal codes on exit - so instead of $?=1 on ctrl-c, you'll see $?=130 as per http://tldp.org/LDP/abs/html/exitcodes.html — committed to remy/nodemon by remy 6 years ago
- fix: send proper quit signal on ctrl-c (#1387) Fixes #1386 Also sends the correct signal codes on exit - so instead of $?=1 on ctrl-c, you'll see $?=130 as per http://tldp.org/LDP/abs/html/exitco... — committed to remy/nodemon by remy 6 years ago
- fix: revert stdin handling Fixes #1389 Fixes #1390 Ref #1386 Means that ctrl^l does not instantly clear the terminal. It requires a new line directly after. — committed to remy/nodemon by remy 6 years ago
- fix: revert stdin handling Fixes #1389 Fixes #1390 Ref #1386 Means that ctrl^l does not instantly clear the terminal. It requires a new line directly after. — committed to remy/nodemon by remy 6 years ago
@remy I had the same issue on Mac with 1.18.1, but it works fine with 1.18.2-alpha.1
Here’s what I get when I hit control-c:
Also encountered this error today in our dev shop (MacOS).
Temporary fix was to:
sudo lsof -i tcp:3000&kill -9 <pid>2. Delete node modulesrm -rf node_modules3. Clear npm cache (npm cache clean --forceoryarn cache cleanif you’re using yarn)4. Replace nodemon entry in your npmpackage-lock.jsonwith entry for 1.17.5 (copy here: https://pastebin.com/S0aC2HWA)5. Reinstall node modules (npm install) and run app (npm run dev).npm install nodemon@1.17.5 --save-dev --save-exactWill test
nodemon@1.18.1-apha.2in a moment @remy.I can confirm this is an issue for me as well, I can kill the process on 1.17.5. The issue started appearing after I upgraded to 1.18.0. I am a Mac user.
@remy yes 1.18.2-alpha.1 is working correctly for me too.