ENOSPC
node
filesystem
ai_generated
true
Error: ENOSPC: System limit for number of file watchers reached
ID: node/enospc-system-limit-watchers
96%Fix Rate
97%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 20 | active | — | — | — |
Root Cause
Linux inotify watcher limit exhausted, common with large projects using webpack/vite/jest --watch.
genericWorkarounds
-
97% success Increase inotify watcher limit: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Permanently increases the limit to 524288
Sources: https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers
-
88% success Add large directories to watchOptions.ignored in webpack/vite config
Ignore node_modules and build output directories from file watching
Dead Ends
Common approaches that don't work:
-
Disabling file watching entirely
75% fail
Breaks hot-reload and watch mode development workflow
-
Restarting the dev server repeatedly
80% fail
Temporary; watchers accumulate again
Error Chain
Frequently confused with: