Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grunt watch error - Waiting...Fatal error: watch ENOSPC

Why do I get the Waiting...Fatal error: watch ENOSPC when I run the watch task ? How do I solve this issue?

like image 772
kds Avatar asked May 25 '13 10:05

kds


2 Answers

Any time you need to run sudo something ... to fix something, you should be pausing to think about what's going on. While the accepted answer here is perfectly valid, it's treating the symptom rather than the problem. Sorta the equivalent of buying bigger saddlebags to solve the problem of: error, cannot load more garbage onto pony. Pony has so much garbage already loaded, that pony is fainting with exhaustion.

An alternative (perhaps comparable to taking excess garbage off of pony and placing in the dump), is to run:

npm dedupe 

Then go congratulate yourself for making pony happy.

like image 32
grenade Avatar answered Oct 16 '22 10:10

grenade


After doing some research found the solution. Run the below command.

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

For Arch Linux add this line to /etc/sysctl.d/99-sysctl.conf:

fs.inotify.max_user_watches=524288 
like image 66
kds Avatar answered Oct 16 '22 08:10

kds