Diagnosing nodemon Restart Failures After File Changes
A step‑by‑step diagnostic guide for when nodemon does not restart a Node.js app after file edits, with checks, fixes, and escalation paths.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
A step‑by‑step diagnostic guide for when nodemon does not restart a Node.js app after file edits, with checks, fixes, and escalation paths.
Avoid 'too many open files' errors and restart loops by moving from default nodemon usage to a structured nodemon.json configuration.
Decide between nodemon's default Node execution and the --exec flag. Compare performance trade-offs, avoid common spawn errors, and implement a shared nodemon.json config.
When nodemon detects a deletion of a watched file, it emits a restart event and spawns a new child process, but it does not provide a mechanism to run any user‑defined logic before that restart. The goal is to ensure that critical application state can be verified or restored from a backup before the process is restarted, without having to modify nodemon’s s