Nodemon Error: System limit for number of file watchers reached

I sometimes get this issue when working with VSCode on my Ubuntu machine.

In my case the following workaround helps:

stop the watcher, close VScode, start the watcher, open VSCode again.


If you are using Linux, your project is hitting your system's file watchers limit

To fix this, on your terminal, try:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

You need to increase the inotify watchers limit for users of your system. You can do this from the command line with:

sudo sysctl -w fs.inotify.max_user_watches=100000

That will persist only until you reboot, though. To make this permanent, add a file named /etc/sysctl.d/10-user-watches.conf with the following contents:

fs.inotify.max_user_watches = 100000

After making the above (or any other) change, you can reload the settings from all sysctl configuration files in /etc with sudo sysctl -p.