System Limit for Number of File Watchers Reached

Created at 2019-03-13 Updated at 2020-06-10

TL;DR

Using the Jest plugin in Vue.js in Linux:

npx vue-cli-service test:unit --watch

And you receive this error on your Linux PC:

Error: ENOSPC: System limit for number of file watchers reached, watch…

Open up Terminal, and to resolve the error, run:

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

Source

https://github.com/facebook/jest/issues/3254#issuecomment-297214395

The Rest of the Story

I'll be the first to admit that I have way too way interests, and not enough time. How this relates, is that now I am going through some Vue.js tutorials.

After running the following command while learning about the Jest plugin in Vue.js:

npx vue-cli-service test:unit --watch

I received this error:

Error: ENOSPC: System limit for number of file watchers reached, watch…

Apparently, this is a Linux issue. Currently I'm running Linux Mint 19.1.

Run the following command in the Terminal to resolve the issue:

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

Source

And here is where I discovered the solution. Big thanks to the original poster!

Original post: https://github.com/facebook/jest/issues/3254#issuecomment-297214395

Hope this helps someone else find this solution quicker :-)

End of Line.

Site by Aaron von Awesome using Hexo & Random