监视器错误与ember-cli

时间:2015-12-04 19:00:25

标签: facebook ember.js ember-cli watchman

我正在尝试按照Ember 101中的示例进行操作。我之前已经使用过这段代码而没有任何问题。重新安装我的ubuntu 14.04后出于无关的原因,当我在我的控制台中运行ember serve时,我收到错误[见下文]。

我在https://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch处尝试了解决此问题的方法。我还在.watchmanconfig ignore_dirs per:https://github.com/ember-cli/ember-cli/issues/4101中添加了“node_modules”和“bower_components”,但没有效果。

任何人都知道我做错了什么/安装不正确?

错误:触发了不可恢复的情况。守望者需要你的帮助! 触发条件是在时间戳= 1449200416:inotify-add-watch(/ home / john / Practice / borrowers / tests / unit / models) - >达到了用户对inotify手表总数的限制;增加fs.inotify.max_user_watches sysctl 在您解决之前,所有请求都将继续失败并显示此消息 潜在的问题。您将找到有关修复此问题的更多信息 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)

2 个答案:

答案 0 :(得分:14)

我意识到这是一个旧线程,但是如果其他人偶然发现,我可以通过执行以下命令在我的机器上解决这个问题......

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

下次我跑ember build --watch时,一切正常。

要获得更好的解释,请参阅......

答案 1 :(得分:9)

如果要永久修改系统,可以输入以下命令:

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

在我的Ubuntu 16.04上将ember升级到2.5.0后发生了这件事