Node.js project crashes when I watch my entire directory?
Closed this issue · 6 comments
I have an empty express project (with Jade and Stylus- nothing fancy). If I run livereloadx on the entire project directory with --exclude */{bin,node_modules,test}/ it is crashing with about 50 of these errors:
node[55111] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
However if I just watch the views directory it works great.
Looks like it might possibly be related to this grunt-contrib-watch issue?
Could it have something to do with compiling stylus?
This error is caused by watching too much directories on OSX, and fixed in Node.js v0.11. See joyent/node#5463 (comment) for detail.
Before v0.12 is released, watch less directories please.
Strange- I'm excluding all node_modules and a large icon directory. I don't have more than 20 files in my directory out side of those two dirs... any reason this would not be working?
livereloadx $(pwd) --exclude '*/{node_modules,iconic}/' --include '*.{jade, styl}
Spits out:
Jakes-MacBook-Pro:portfolio jklb$ livereloadx $(pwd) --exclude '*/{node_modules,iconic}/' --include '*.{jade,styl}'
2014-08-11 17:07:53 - info: Config:
2014-08-11 17:07:53 - info: - mode: default
2014-08-11 17:07:53 - info: - port: 35729
2014-08-11 17:07:53 - info: - filter:
2014-08-11 17:07:53 - info: 1: exclude "*/{node_modules,iconic}/"
2014-08-11 17:07:53 - info: 2: include "*.{jade,styl}"
2014-08-11 17:07:53 - info: 3: exclude ".{git,svn}/"
2014-08-11 17:07:53 - info: 4: include "*/"
2014-08-11 17:07:53 - info: 5: include "*.{html,shtml,tmpl,xml,css,js,json,jpeg,jpg,gif,png,ico,cgi,php,py,pl,pm,rb}"
2014-08-11 17:07:53 - info: 6: exclude "*"
2014-08-11 17:07:53 - info: Waiting on port 35729...
2014-08-11 17:07:53 - info: Watching "/Users/jklb/Development/jklb/portfolio"...
Are you using livereloadx v0.3.5?
Before v0.3.4, filter option doesn't work correctly (#10)
Yep, livereloadx@0.3.5
I read source code again, and found that livereloadx watches all descendant directories even if they are excluded by --exclude
option.
Reopen.