我尝试从http://arcturo.github.io/library/coffeescript/05_compiling.html获取蛋糕示例来运行。但这会导致一个奇怪的错误:
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
这是我的 Cakefile(刚刚从“关于 CoffeeSCript 的小书”复制而来)
fs = require 'fs'
{print} = require 'sys'
{spawn} = require 'child_process'
build = (callback) ->
coffee = spawn 'coffee', ['-c', '-o', 'lib', 'src']
coffee.stderr.on 'data', (data) ->
process.stderr.write data.toString()
coffee.stdout.on 'data', (data) ->
print data.toString()
coffee.on 'exit', (code) ->
callback?() if code is 0
task 'build', 'Build lib/ from src/', ->
build()
我正在使用 Coffee 1.6.3 和节点 0.10.20。
有谁知道我做错了什么?谢谢!