Skip to content


Subversion checkout URL

You can clone with
Download ZIP


EMFILE error when using coffee --watch #2004

kncapara opened this Issue · 6 comments

4 participants


Good Day,

Just want to report bug. I'm using coffee script 1.1 before. After I upgrade to 1.2 version i got this error message. Please see below error message.

if (e.code !== 'ENOENT') throw e;
Error: watch EMFILE
at errnoException (fs.js:636:11)
at FSWatcher.start (fs.js:663:11)
at (fs.js:691:11)
at /usr/local/lib/coffee-script/lib/coffee-script/command.js:256:27
at Object.oncomplete (/usr/local/lib/coffee-script/lib/coffee-script/command.js:85:25)

Other files is sometimes compiled properly and sometimes error occurs even if i only created an empty directory. All my files are working from my previous coffee version before i upgrade to 1.2.


@kncapara: can you tell us what's causing the problem?

@TrevorBurnham: looks like something related to --watch. Is it possible this is fixed already?


An EMFILE error means "Too many open files." Or to be more precise:

Normally, 32-bit applications return an EMFILE error when attempting to associate a stream with a file accessed by a file descriptor with a value greater than 255.

Most likely, there's nothing we can do on our end to fix this. I'm curious, though, what it takes to replicate this error. Are you trying to watch a large number of files, @kncapara?

(Btw, if you're looking for a quick workaround, Jitter still uses the fs.watchFile API used by CoffeeScript <= 1.1.2.)


So, duplicate of #1537 then?


Yeah seems to work with 1.1.1 just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.