1

设置twilson63 构建的快速咖啡应用程序。似乎蛋糕找不到咖啡,但他们都可以which。还有什么我需要在这里做的吗?这是我的步骤:

jcollum@DEVELOPER01 ~/dev/express-coffee-master
$ which coffee
/c/Users/jcollum/AppData/Roaming/npm/node_modules/coffee-script/bin/coffee

好的咖啡在那里。

jcollum@DEVELOPER01 ~/dev/express-coffee-master
$ which cake
/c/Users/jcollum/AppData/Roaming/npm/node_modules/coffee-script/bin/cake

蛋糕也是如此。

jcollum@DEVELOPER01 ~/dev/express-coffee-master
$ cake
Cakefile defines the following tasks:

cake docs                 # Generate annotated source code with Docco
cake build
cake spec                 # Run Mocha tests
cake test                 # Run Mocha tests
cake dev                  # start dev env
cake debug                # start debug env
cake scaffold             # scaffold model/controller/test

  -n, --name         name of model to `scaffold`

Cake 在本地找到了一个 cakefile。

jcollum@DEVELOPER01 ~/dev/express-coffee-master
$ cake dev

c:\Users\jcollum\dev\express-coffee-master\node_modules\which\which.js:83
  throw new Error("not found: "+cmd)
        ^
Error: not found: coffee
    at Function.whichSync [as sync] (c:\Users\jcollum\dev\express-coffee-master\node_modules\which\which.js:83:9)
    at Object.options [as action] (c:\Users\jcollum\dev\express-coffee-master\Cakefile:121:17)
    at helpers.extend.invoke (c:\Users\jcollum\AppData\Roaming\npm\node_modules\coffee-script\lib\coffee-script\cake.js:44:26)
    at Object.exports.run (c:\Users\jcollum\AppData\Roaming\npm\node_modules\coffee-script\lib\coffee-script\cake.js:69:21)
    at Object.<anonymous> (c:\Users\jcollum\AppData\Roaming\npm\node_modules\coffee-script\bin\cake:7:38)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)

呸呸呸!没有。我怀疑这是 Windows 7 的问题,并且节点不能很好地一起玩。

4

1 回答 1

0

似乎答案是确保我的环境中有一个 NODE_PATH:

export NODE_PATH=/c/Users/jcollum/AppData/Roaming/npm:/c/Users/jcollum/AppData/Roaming/npm/node_modules

要么,要么将node_modules.bash_profile 添加到我的 PATH 中。

在这里得到了想法:https ://github.com/replit/jsrepl/issues/56

于 2013-02-12T22:24:50.223 回答