Languages

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

7 points
Asked by:
Root-ssh
104650

Gatsby started printing warning in console after I added new files to my project:

warn Error from chokidar (/home/john/Projects/shop-ui/node_modules/@material-ui/icons): Error: ENOSPC: System limit for number of file watchers reached, watch

I run my application with:

gatsby develop --host=0.0.0.0

Do you know how to solve the problem?

1 answer
7 points
Answered by:
Root-ssh
104650

I have found solution.

I had set up to 65536 watchers per user.

The solution was to increase number of watchers and reload configuration with following command:

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

The command that returns current max number of watchers per user is:

cat /proc/sys/fs/inotify/max_user_watches

 

0 comments Add comment
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join