I have Testem installed on my Mac os x (version 0.2.52 as my colleagues have, but also with the latest version the problem remains) and CoffeeScript (1.6.3). We use testem to run all the Mocha specs of our project, and all worked smoothly for a while, just typing:
testem
in the proper folder. Suddenly (I reckon after a Mac software update), it stopped working if not run with sudo privilegies. It was annoying, but with no time to look at it deeply I just got used to run:
sudo testem
Then (after yet another Mac software update, I'm still guessing) it stopped working at all, giving me this error:
Error running before_tests hook: coffee -co test/temp . && handlebars app/templates -a true -f test/temp/app/scripts/Templates.js
child_process.js:794
throw errnoException(errno, 'spawn');
^
Error: spawn EAGAIN
at errnoException (child_process.js:847:11)
at ChildProcess.spawn (child_process.js:794:11)
at exports.spawn (child_process.js:618:9)
at Object.exports.execFile (child_process.js:510:15)
at exports.exec (child_process.js:481:18)
at writeJs (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:432:16)
at Object.fs.exists [as oncomplete] (fs.js:91:19)
I get the same error if I type only the coffeescript part:
coffee -co test/temp .
That's why I guess it's a problem with CoffeeScript. And permission, I would say.
Just to add a bit of context ('cause I know it sounds really weird), it's a Backbone/Marionette project run into Yeoman (0.9.6).
Any ideas? Thanks in advance.
* UPDATE * If I run simply:
coffee -c . // without the "-o test/temp" option
it actually compiles the files with no errors (putting the generated javascript in the wrong folder).
my-app
|
| - test // this one always exists, because it contains the specs of the project and other stuff
| - ...
| - temp // this folder is created and deleted by testem
So in the end it seems a matter of having the permission to create, write and delete the temp folder, isn't it? Anyone?