I kept getting this annoying problem after following this tutorial which is best described in this gulp thread. https://github.com/JacksonGariety/gulp-nodemon/issues/77. I'm not using gulp but the problem is the same. By adding process.exit() on nodemon quit the problem goes away smoothly.
Maybe add this process.exit() hint in the docs here?