coffeescript icon indicating copy to clipboard operation
coffeescript copied to clipboard

System errno 28 while watching coffee files

Open shreyas-satish opened this issue 14 years ago • 18 comments

When I run

coffee -w -c *.coffee

I get

/home/shreyas/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:227
  if (e.code !== 'ENOENT') throw e;
                                 ^
Error: watch Unknown system errno 28
    at errnoException (fs.js:605:11)
    at FSWatcher.start (fs.js:632:11)
    at Object.watch (fs.js:660:11)
    at /home/shreyas/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:232:27
    at Object.oncomplete (/home/shreyas/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:106:25)

The folder I'm running the command just has 3 coffee files. Running the command against just one file results in the same error. I did have a look at https://github.com/jashkenas/coffee-script/issues/1537 but that didn't help.

I'm running CoffeeScript - 1.2.0 & Node 0.6.1 on Linux.

UPDATE

As a temporary fix, I've patched the watch function in command.js with this - http://stackoverflow.com/questions/8119066/coffeescript-watch-switch-not-working-with-node-0-4-7 .

shreyas-satish avatar Jan 08 '12 10:01 shreyas-satish

Running the command against just one file results in the same error.

So this error occurs whenever running that command, regardless of file contents, permissions, etc?

michaelficarra avatar Jan 09 '12 14:01 michaelficarra

@michaelficarra Yes.

shreyas-satish avatar Jan 09 '12 14:01 shreyas-satish

I don't know how I'm going to be able to reproduce this. We have a lot of users watching/compiling files on Linux/Node 0.6.x without problem, myself included.

michaelficarra avatar Jan 09 '12 15:01 michaelficarra

It sounds like you weren't actually using 0.6?

jashkenas avatar Jan 09 '12 16:01 jashkenas

I am using node 0.6! If it helps, I face this error with both node 0.6.1 & 0.6.5 and the error goes away when I apply the patch.

shreyas-satish avatar Jan 09 '12 16:01 shreyas-satish

Not able to reproduce this issue in another linux machine. If nobody else is facing such a problem, there's probably something wrong with my config (But definitely not the version of node :) )

shreyas-satish avatar Jan 09 '12 17:01 shreyas-satish

I have the exact same problem:

When issuing command coffee --watch --compile abc.coffee, I get:

/home/ccl/.nvm/v0.6.9/lib/node_modules/coffee-script/lib/coffee-script/command.js:227 if (e.code !== 'ENOENT') throw e; ^ Error: watch Unknown system errno 28 at errnoException (fs.js:636:11) at FSWatcher.start (fs.js:663:11) at Object.watch (fs.js:691:11) at /home/ccl/.nvm/v0.6.9/lib/node_modules/coffee-script/lib/coffee-script/command.js:232:27 at Object.oncomplete (/home/ccl/.nvm/v0.6.9/lib/node_modules/coffee-script/lib/coffee-script/command.js:106:25)

ubuntu 11.10 x64, node v0.6.9 coffeescript v1.2.0

ghost avatar Feb 06 '12 09:02 ghost

@cc-lam Interesting. I too am using Ubuntu 11.10 x64 but I'm not facing any such problem. Is your ~/.bashrc configured correctly? Also, does the error go away when u apply the patch I've linked to above?

shreyas-satish avatar Feb 06 '12 09:02 shreyas-satish

@shreyas-satish Yep, the error goes away with the patch. Were you able to have watch working without the patch ?

ghost avatar Feb 06 '12 10:02 ghost

Yes, I don't need the patch.

On Mon, Feb 6, 2012 at 4:04 PM, cc-lam < [email protected]

wrote:

@shreyas-satish Yep, the error goes away with the patch. Were you able to have watch working without the patch ?


Reply to this email directly or view it on GitHub: https://github.com/jashkenas/coffee-script/issues/2016#issuecomment-3826397

shreyas-satish avatar Feb 06 '12 10:02 shreyas-satish

I'm having a similar problem here on Debian squeez.

I opened a new ticket as my error message is slightly different:

https://github.com/jashkenas/coffee-script/issues/2113

sattes-faction avatar Feb 10 '12 14:02 sattes-faction

Same problem here. From a fresh installation (but using zsh)

Ubuntu 11.10 x64 Node v0.7.8-pre CoffeeScript version 1.2.0 npm 1.1.4

$ coffee-test coffee -cw .

/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:287 if (e.code !== 'ENOENT') throw e; ^ Error: watch ENOSPC at errnoException (fs.js:723:11) at FSWatcher.start (fs.js:750:11) at Object.watch (fs.js:778:11) at /usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:256:27 at Object.oncomplete (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:85:25)

jalvarezsamayoa avatar Apr 01 '12 04:04 jalvarezsamayoa

A possible issue could be a that you've capped the max of inotify. This commonly happens with large Dropbox folders. It fixed the problem for me.

http://forums.dropbox.com/topic.php?id=19978

tzbob avatar Apr 26 '12 18:04 tzbob

I got here because I got an error with nodemon. Who knew that the problem was caused because I was running the project inside my Dropbox directory.

running echo fs.inotify.max_user_watches=100000 | sudo tee -a /etc/sysctl.conf; sudo sysctl -p /etc/sysctl.conf

solved the problem for me, thanks to Tzbob

luiselizondo avatar Aug 04 '12 05:08 luiselizondo

@lelizondo thank you! and thanks to Tzbob ofcourse

milushov avatar Jan 10 '13 20:01 milushov

Awesome, lelizondo's fix fixed this for me!

Linux 3.2.0-29-generic x86_64 Ubuntu 12.04.1 LTS

rbeen avatar Jan 29 '13 09:01 rbeen

@lelizondo @Tzbob Thanks guys, solved here too :+1:

dancar avatar Mar 09 '13 10:03 dancar

@lelizondo You are my hero! :+1: For any reason this also fix my problem with vim + powerline...

helmuthdu avatar Jul 18 '13 12:07 helmuthdu