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:
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)
1. Open file sysctl.conf (I use VIM to make data modifications)
sudo vim /etc/sysctl.conf
2. Add a line at the bottom
3. Save and Reboot your PC.
4. Check again whether it has been updated with the following command
sudo sysctl -p
Please try the ‘npm start‘ command again.
Thus a brief tutorial on how to Fix React Error: ENOSPC: System limit for number of file watchers reached in ReactJS. Hopefully, useful.
Great job thank you
ReplyDelete