Error AtlasError Documentation and Resolution

Vite hit the Linux file watcher limit

Error: ENOSPC: System limit for number of file watchers reached

Vite can crash on Linux when the dev server needs to watch more files than the operating system allows.

Error: ENOSPC: System limit for number of file watchers reacheddevelopment servers
Error: ENOSPC: System limit for number of file watchers reached
  • The project contains more watched files than the Linux inotify limit allows.
  • Large asset or generated directories are being watched unnecessarily.
  • The dev server is running on a host with low default watcher limits.
  1. Increase the Linux file watcher limit such as fs.inotify.max_user_watches and reload the setting.
  2. Exclude heavy directories from Vite file watching with server.watch.ignored when they do not need live reload.
  3. Use polling only if necessary, since it consumes more CPU than normal file system events.
Vite: Troubleshooting
Vite ENOSPC: System limit for number of file watchers reached | Error Atlas