nodemon: Nodemon child process not being killed with update to 1.18.0

  • nodemon -v: 1.18.0
  • node -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

Most upvoted comments

@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:

screen shot 2018-07-11 at 10 59 21 am

Also encountered this error today in our dev shop (MacOS).

Temporary fix was to:

  1. Kill process sudo lsof -i tcp:3000 & kill -9 <pid> 2. Delete node modules rm -rf node_modules 3. Clear npm cache (npm cache clean --force or yarn cache clean if you’re using yarn) 4. Replace nodemon entry in your npm package-lock.json with entry for 1.17.5 (copy here: https://pastebin.com/S0aC2HWA) 5. Reinstall node modules (npm install) and run app (npm run dev).
  2. Install 1.17.5 npm install nodemon@1.17.5 --save-dev --save-exact

Will test nodemon@1.18.1-apha.2 in 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.