nodemon file watching: native events vs polling across operating systems
0 reputation · 08 Feb 2026, 07:00 UTC
I am setting up nodemon for a Node.js development environment and need to understand how it decides between native file system events and polling when watching directories.
The documentation confirms nodemon restarts the process on file changes and supports configuration through nodemon.json, including watch paths and ignore patterns. What is less clear to me is how the underlying watcher behaves differently across Linux, macOS, and Windows, and under what conditions nodemon falls back to polling (for example on network mounts, Docker volumes, or large directory trees). I am also aware that excessive watching can cause high CPU usage or EMFILE errors, so the choice of watching mode seems directly relevant.
My goal is to pick a reliable watch configuration for a team working across mixed operating systems, some inside containers, without silent missed restarts or resource exhaustion.
- Does nodemon expose or document which watching mechanism is active, and can polling be forced or disabled via configuration?
- Are there documented cases (Docker volumes, NFS, WSL) where native events are unreliable and polling is required?
- What is the recommended way to verify that a change actually triggered a restart when diagnosing suspected watcher issues?