Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I got a following error when I tried to watch coffee scripts by coffee -o js -cw coffee.

/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:321
        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 /usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:287:27
    at Object.oncomplete (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:100:11)

I have no idea what is going with error.

Then I checked the versions, coffee -v is 1.6.1 and node -v is v0.6.12.

According the official site( http://coffeescript.org/ ) the latest version is 1.6.3, so I wanted update coffee by npm update -g coffee-script, but this fails also.

npm WARN coffee-script@1.6.1 package.json: bugs['name'] should probably be bugs['url']
npm http GET https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/coffee-script

How can I update coffee script?

Edit 2013/10/11

In my coffee script directory there is only one file box_wrapper.coffee.

$ ->
  $("body").children().wrap ->
    "<div id='#{$(@).attr "id"}_box' class='wrapper'/>"

Edit 2013/10/16

I tried to re-install coffee, so I've done like this.

$ sudo npm -g rm coffee
npm WARN Not installed in /usr/local/lib/node_modules coffee
$ coffee -v
CoffeeScript version 1.6.1

I can't remove coffee. And I tried also like this.

$ sudo apt-get remove npm
$ npm -v
-bash: /usr/bin/npm: No such file or directory
$ sudo apt-get install npm
$ npm -v
1.1.4
$ sudo npm -g install coffee

# I omit a lot of `GET` parts.

npm http 304 https://registry.npmjs.org/mkdirp/0.3.4
npm ERR! error installing express@3.2.6
npm http 304 https://registry.npmjs.org/assertion-error/1.0.0
npm http 304 https://registry.npmjs.org/growl
npm http 304 https://registry.npmjs.org/jade/0.26.3
npm http 304 https://registry.npmjs.org/diff/1.0.2
npm http 304 https://registry.npmjs.org/mkdirp/0.3.5
npm http 304 https://registry.npmjs.org/glob/3.2.1
npm http 304 https://registry.npmjs.org/ms/0.3.0
npm ERR! error rolling back express@3.2.6 Error: UNKNOWN, unknown error '/usr/local/lib/node_modules/coffee/node_modules/express'
npm ERR! error installing coffee@0.0.1

npm ERR! EEXIST, file already exists '/usr/local/lib/node_modules/coffee/node_modules/mocha/node_modules'
npm ERR! File exists: /usr/local/lib/node_modules/coffee/node_modules/mocha/node_modules
npm ERR! Move it away, and try again.
npm ERR! 
npm ERR! System Linux 3.2.0-54-generic-pae
npm ERR! command "node" "/usr/bin/npm" "-g" "install" "coffee"
npm ERR! cwd /home/ironsand
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! path /usr/local/lib/node_modules/coffee/node_modules/mocha/node_modules
npm ERR! fstream_path /usr/local/lib/node_modules/coffee/node_modules/mocha/node_modules/___debug.npm
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EEXIST
npm ERR! message EEXIST, file already exists '/usr/local/lib/node_modules/coffee/node_modules/mocha/node_modules'
npm ERR! errno {}
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:161:23
npm ERR! fstream_stack Object.oncomplete (/usr/lib/nodejs/mkdirp.js:34:53)

npm ERR! EEXIST, file already exists '/usr/local/lib/node_modules/coffee/node_modules/mocha/node_modules'
npm ERR! File exists: /usr/local/lib/node_modules/coffee/node_modules/mocha/node_modules
npm ERR! Move it away, and try again.
npm ERR! 
npm ERR! System Linux 3.2.0-54-generic-pae
npm ERR! command "node" "/usr/bin/npm" "-g" "install" "coffee"
npm ERR! cwd /home/ironsand
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! path /usr/local/lib/node_modules/coffee/node_modules/mocha/node_modules
npm ERR! fstream_path /usr/local/lib/node_modules/coffee/node_modules/mocha/node_modules/___debug.npm
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EEXIST
npm ERR! message EEXIST, file already exists '/usr/local/lib/node_modules/coffee/node_modules/mocha/node_modules'
npm ERR! errno {}
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:161:23
npm ERR! fstream_stack Object.oncomplete (/usr/lib/nodejs/mkdirp.js:34:53)
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/ironsand/npm-debug.log
npm not ok

And npm-debug.log is a blank file.

share|improve this question
add comment

2 Answers 2

The thing is that the npmjs repositories doesn't have the 1.6.3 but the 1.6.1. I will presume here, but the reason of your error is with your code, not CoffeeScript:

    } catch (e) {
      if (e.code !== 'ENOENT') {
        throw e;
      }
    }
  };

The above indicates that if e.code isn't exactly the same as ENOENT then throw the error, which in your case is:

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 /usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:287:27
    at Object.oncomplete (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:100:11)

I would check the file fs.js and/or reverting the last changes you did to your code. CoffeScript is doing just fine, the problem is elsewhere.


For people that might actually update their CoffeScript

If you really want to use the latest CoffeScript, then the method to install it is using:

npm install -g http://github.com/jashkenas/coffee-script/tarball/master

This will install the latest CoffeScript, if you want the 1.6.3 version then you should use:

npm install -g http://github.com/jashkenas/coffee-script/tarball/1.6.3

Replace the 1.6.3 with the version of CoffeScript you like.

share|improve this answer
    
Thanks for your Answer! But I never touched fs.js, and I don't even know where is it. I searched the file by locate "fs.js", but it appears only *-refs.js or *-defs.js, there is no "fs.js" file. What should I next to solve this problem? –  Tetsu Oct 11 '13 at 8:59
    
Just to make certain, I added information about my coffee script. –  Tetsu Oct 11 '13 at 9:00
    
As far as I know, I've not touched any coffee script files. I installed coffee and am using default setting. I've never even try to change settings. I'm create a folder ~/Dropbox/www/mysite and cd to the direcotory and a index.html file, and create js and coffee directries. After that copy some .js files to js directory that I use and create box_wrapper.coffee in coffee directory. –  Tetsu Oct 11 '13 at 12:26
    
And do coffee -o js -cw coffee, then I got the error. –  Tetsu Oct 11 '13 at 12:28
    
I've done same thing again in my home directory. But error message is same. –  Tetsu Oct 14 '13 at 18:21
show 2 more comments
up vote 5 down vote accepted

The error occurs because of old nodejs version. Ubuntu 12.04, 13.04 default nodejs package is version 0.6.x.

I updated nodejs version to v0.10.20 like this, then the problem is solved.

sudo apt-get update
sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

I followed the instruction from here. https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager

share|improve this answer
    
Ohh... so it was a bug –  Braiam Oct 18 '13 at 18:43
    
Many thanks this also fix my problem with bower installation –  user2041318 Jan 4 at 16:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.