Skip to content

All topics  /  React

Solved - System Limit for Number of File Watchers Reached ReactJs

React ·

When “Solved - System Limit for Number of File Watchers Reached ReactJs” moves through design, development and browser testing, the product team's article can clarify hand-offs and time spent on revisions while leaving code quality, accessibility and released behaviour as the real measures of success.

For API changes, browser support and current usage patterns, compare the snippet with the official React website before adopting it in production.

In this post i want to share one issue that i fetch. When i started working on my react js project on my ubuntu, then get a error like system limit for number of file watchers reached thenafter i run bellow command:I run npm start command then get a error system limit for number of file watchers reached.

Is anyone learning ReactJS experiencing an error: “ENOSPC: System limit for number of file watchers reached“? I just experienced it. But don’t worry because there is a solution.

This error occurs when running the “npm start” command. Causes of ENOSPC errors: System limit for number of file watchers reached because the number of files monitored by the system has reached its limit.

Solution 1


If you want to get error once you are trying to execute npm start, it’s because of your `max_user_watches` was reached the maximum number. Simply you can increase the `max_user_watches` by running this command :

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

Now you can run npm start again.

npm start

Solution 2

The way is to modify the amount in the monitoring system file. Here’s how to modify max_user_watches on Ubuntu. (Ubuntu I use is Ubuntu version 18.04)

In this step you can open /etc/sysctl.conf file and make change max_use_watches value.

you can open /etc/sysctl.conf file through command then run bellow command:

nano /etc/sysctl.conf

open file thenafter add a line at the bottom:

fs.inotify.max_user_watches=524288

Now Save file and Restart your PC.

Restart PC thenafter Check again whether it has been updated with the following command

sudo sysctl -p

Now you can run npm start again.

npm start

It will help you...