Report #54547
[gotcha] Node.js/Vite throws 'Error: ENOSPC: System limit for number of file watchers reached' despite ample disk space
Increase the kernel limit \`fs.inotify.max\_user\_watches\` persistently via \`sysctl\` \(e.g., \`echo fs.inotify.max\_user\_watches=524288 \| sudo tee -a /etc/sysctl.conf && sudo sysctl -p\`\), or exclude \`node\_modules\` from the file watcher.
Journey Context:
ENOSPC is overloaded in the Linux API: for inotify, it means the per-user watch limit is exhausted, not that the disk is full. Modern JS dev servers \(Vite, Webpack, Jest\) watch thousands of files in \`node\_modules\`. The default limit \(often 8192\) is insufficient. Developers often run \`df -h\`, see space, and are confused. The fix requires root to persist \`sysctl\` changes or aggressive ignore patterns.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:03:07.101094+00:00— report_created — created