Tengo pasión por la tecnología, los proyectos y el liderazgo. Soy el Fundador y CEO de YAKINDU. He liderado varios proyectos tecnológicos para empresas públicas y privadas. Creo que el Ecuador puede transformarse digitalmente para ser mas competitivos y entregar valor al mundo.
System limit for number of file watchers reached
System limit for number of file watchers reached

System limit for number of file watchers reached

This error is very common on Linux when working with large projects (which has many dependencies in ( node_modules).

The error ENOSPC: System limit for number of file watchers reached your operating system has hit the limit on the number of files it can monitor for real-time changes (something tools like Webpack or Vite do constantly).

To fix it, you need to increase the inotify limit on your system. Here is how to do it:

Quick Solution (Temporary until restart)

Run this command in your terminal to increase the limit immediately:

sudo sysctl fs.inotify.max_user_watches=524288

Try starting your app again; it should work now.

Permanent Solution (Persists after restart)

To avoid having to type the command every time you restart your computer:

  1. Add the configuration to the sysctl.conf Add the configuration to the (or you can create a file in .d):
echo "fs.inotify.max_user_watches=524288" | sudo tee -a /etc/sysctl.conf
  1. Apply the changes:
sudo sysctl -p

With this, the file watcher limit will be high enough to handle all the files in your project and its dependencies.