Watchman Error with ember-cli
Asked Answered
P

2

9

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)
Pyrazole answered 4/12, 2015 at 19:0 Comment(0)
A
15

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...

Asset answered 9/2, 2016 at 23:8 Comment(2)
This helped me with my React-native app!Jeremy
This helped me on Ubuntu 17.04. CheersGlasser
C
9

If you want to permanently modify your system you can put this commands:

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

It has happened to me after upgrading ember to 2.5.0 on my Ubuntu 16.04

Costermonger answered 12/5, 2016 at 16:6 Comment(1)
this permanent fix was much better for me as it takes into account rebooting of the server.Hix

© 2022 - 2024 — McMap. All rights reserved.