coffeescript - CoffeeScript和 Cake 错误

  显示原文与译文双语对照的内容
0 0

我尝试从 http://arcturo.github.io/library/coffeescript/05_compiling.html 获取 Cake 示例。 但这导致了一个奇怪的错误:


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)

这是我关于CoffeeSCript的Cakefile ( 刚从"小手册


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.

有谁知道我在做什么? 谢谢!

时间: 原作者:

0 0

ENOENT通常表示"我找了你让我找的东西但我没找到"。 从示例页面中:

For example, create a file called Cakefile, and two directories, lib and src.

你有这两个?

原作者:
...