Languages

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

7 points
Asked by:
Root-ssh
7512

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 answers
7 points
Answered by:
Root-ssh
7512

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
Hey 👋
Would you like to know what we do?
  • Dirask is online IT community for professionals and hobbyist to share their knowledge and help each other in extraordinary easy way.
  • We welcome everyone
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.