Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jung command fails on large directories on Mac OS X #3

Open
fardog opened this issue Nov 10, 2013 · 2 comments
Open

jung command fails on large directories on Mac OS X #3

fardog opened this issue Nov 10, 2013 · 2 comments

Comments

@fardog
Copy link

fardog commented Nov 10, 2013

This was tested on Mac OS X "Mavericks" on an rMBP (15-inch Early 2013).

Seemingly when working with large directories, jung will fail. I'm assuming it's large directories, because it will work fine with a directory with one or two files in it, but for my actual use-case, it fails. To replicate, perform the following:

npm install -g sails
sails new testproject --linker
cd testproject
npm install
jung -- cat package.json

This will fail with the following:

fs.js:1051
    throw errnoException(process._errno, 'watch');
          ^
Error: watch EMFILE
    at errnoException (fs.js:1019:11)
    at FSWatcher.start (fs.js:1051:11)
    at Object.fs.watch (fs.js:1076:11)
    at initWatcher (/usr/local/lib/node_modules/jung/node_modules/watch-fs/lib/watcher.js:99:32)
    at /usr/local/lib/node_modules/jung/node_modules/watch-fs/lib/watcher.js:92:9
    at Array.forEach (native)
    at initWatchers (/usr/local/lib/node_modules/jung/node_modules/watch-fs/lib/watcher.js:91:22)
    at /usr/local/lib/node_modules/jung/node_modules/watch-fs/lib/watcher.js:241:13
    at /usr/local/lib/node_modules/jung/node_modules/watch-fs/lib/watcher.js:72:9
    at /usr/local/lib/node_modules/jung/node_modules/watch-fs/node_modules/async/lib/async.js:116:25
@jarofghosts
Copy link
Owner

Unfortunately, it is due to a system-level limit on the number of file event watchers that can be registered, so the solution is not immediately obvious. Until I can fix it, if you don't need to watch a directory it's best to exclude it with the --notdirs, -D flag to avoid these kind of issues.

For example, jung -D node_modules -- cat package.json

@fardog
Copy link
Author

fardog commented Nov 12, 2013

ok, that works fine. i'll leave it to you if you want to close this issue, but it's resolved for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants