Setting up the express coffee app that twilson63 built. It seems that cake can't find coffee, but they both are ok with which
. Is there something else I need to do here? Here's my steps:
jcollum@DEVELOPER01 ~/dev/express-coffee-master
$ which coffee
/c/Users/jcollum/AppData/Roaming/npm/node_modules/coffee-script/bin/coffee
OK coffee is there.
jcollum@DEVELOPER01 ~/dev/express-coffee-master
$ which cake
/c/Users/jcollum/AppData/Roaming/npm/node_modules/coffee-script/bin/cake
And so is 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 found a cakefile locally.
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)
Bzzzzttt! Nope. I suspect this is an issue with Windows 7 and node not playing all that nicely together.
Seems the answer was to make sure I had a NODE_PATH in my env:
export NODE_PATH=/c/Users/jcollum/AppData/Roaming/npm:/c/Users/jcollum/AppData/Roaming/npm/node_modules
Either that, or adding the node_modules
to my PATH in .bash_profile.
Got the idea here: https://github.com/replit/jsrepl/issues/56