Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Watchman Error with ember-cli

I am trying to follow the examples in Ember 101. I have worked through this code once before without any issue. After reinstalling my ubuntu 14.04 for unrelated reasons I am getting an error [see bellow] when I run ember serve in my console.

I tried the solution to this problem at: https://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch. I also added "node_modules" and "bower_components" to the .watchmanconfig ignore_dirs per: https://github.com/ember-cli/ember-cli/issues/4101 without effect.

Anyone know what I am doing wrong/have installed incorrectly?

Error: A non-recoverable condition has triggered. Watchman needs your help! The triggering condition was at timestamp=1449200416: inotify-add-watch(/home/john/Practice/borrowers/tests/unit/models) -> The user limit on the total number of inotify watches was reached; increase the fs.inotify.max_user_watches sysctl All requests will continue to fail with this message until you resolve the underlying problem. You will find more information on fixing this at https://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch

at ChildProcess.<anonymous> (/home/john/Practice/borrowers/node_modules/ember-cli/node_modules/sane/node_modules/fb-watchman/index.js:202:17)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:818:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:469:12)
like image 594
user3330833 Avatar asked Dec 04 '15 19:12

user3330833


1 Answers

I realize this is an old thread, but in case somebody else stumbles here I was able to solve this on my machine by executing the following commands...

$ sudo sysctl fs.inotify.max_user_watches=524288
$ watchman shutdown-server

The next time I ran ember build --watch, everything worked.

For a much better explanation, see...

  • https://unix.stackexchange.com/questions/13751/kernel-inotify-watch-limit-reached
  • https://facebook.github.io/watchman/docs/install.html#system-specific-preparation
like image 54
bcrowell Avatar answered Oct 01 '22 16:10

bcrowell