I'm trying to automate a simple gulp task to run/debug node, watch for file changes, and restart node if any files change. Most popular recipes I've seen for this use gulp-nodemon
, but when a file change event occurs, (gulp-) nodemon
crashes:
[nodemon] app crashed - waiting for file changes before starting...
The crashing happens inconsistently, so sometimes I have to manually send a SIGINT
to stop the node process (which kind of defeats the purpose of nodemon).
I want to be able to run a gulp task that can watch files, run or debug node. How can this be accomplished without nodemon crashing?