Mac os x (同僚と同じようにバージョン 0.2.52 ですが、最新バージョンでも問題は残っています) と CoffeeScript (1.6.3) に Testem をインストールしています。testem を使用してプロジェクトのすべての Mocha 仕様を実行し、次のように入力するだけで、しばらくの間すべてスムーズに動作しました。
testem
適切なフォルダーに。突然 (Mac ソフトウェアの更新後と思われます)、sudo 権限で実行しないと動作しなくなりました。面倒でしたが、深く見る時間がなかったので、実行に慣れました:
sudo testem
その後 (さらに別の Mac ソフトウェア アップデートの後、私はまだ推測しています)、まったく動作しなくなり、次のエラーが表示されました。
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)
coffeescript の部分だけを入力すると、同じエラーが発生します。
coffee -co test/temp .
ということで、CoffeeScript の問題かと思います。そして、許可、と私は言います。
少し文脈を追加するだけです (非常に奇妙に聞こえるので)、これは Yeoman (0.9.6) に実行される Backbone/Marionette プロジェクトです。
何か案は?前もって感謝します。
* 更新* 単純に実行すると:
coffee -c . // without the "-o test/temp" option
実際にはエラーなしでファイルをコンパイルします(生成されたJavaScriptを間違ったフォルダーに入れます)。
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
結局、temp フォルダーの作成、書き込み、削除の権限が必要なようですね。誰?