bnolan / capt

Command line tool for creating backbone.js applications
294 stars 21 forks source link

Getting started #1

Closed jasonm closed 13 years ago

jasonm commented 13 years ago

Hey Ben,

I'm interested in using (and hopefully contributing to) capt. I've used backbone a bit, but am pretty new to coffee and node. Can you point me in the right direction?

I looked online for a reference about node loadpaths, but couldn't find anything that seemed to help.

I am on OSX - I installed node via homebrew, and coffeescript via npm. I cloned this repo.

[master][~/dev/capt] uname -a
Darwin Jason-Morrisons-MacBook-Pro.local 10.5.0 Darwin Kernel Version 10.5.0: Fri Nov  5 23:20:39 PDT 2010; root:xnu-1504.9.17~1/RELEASE_I386 i386
[master][~/dev/capt] git st
# On branch master
nothing to commit (working directory clean)
[master][~/dev/capt] brew -v   
0.7.1
[master][~/dev/capt] which node
/usr/local/bin/node
[master][~/dev/capt] node -v
v0.2.6
[master][~/dev/capt] which coffee
/usr/local/share/npm/bin/coffee
[master][~/dev/capt] coffee -v
CoffeeScript version 1.0.0
[master][~/dev/capt] bin/capt

node.js:63
    throw e;
    ^
Error: Cannot find module 'coffee-script'
    at loadModule (node.js:275:15)
    at require (node.js:411:14)
    at Object.<anonymous> (/Users/jason/dev/capt/bin/capt:5:1)
    at Module._compile (node.js:462:23)
    at Module._loadScriptSync (node.js:469:10)
    at Module.loadSync (node.js:338:12)
    at Object.runMain (node.js:522:24)
    at Array.<anonymous> (node.js:756:12)
    at EventEmitter._tickCallback (node.js:55:22)
    at node.js:773:9

[master][~/dev/capt] which coffee
/usr/local/share/npm/bin/coffee
[master][~/dev/capt] coffee -v
CoffeeScript version 1.0.0
[master][~/dev/capt] coffee src/main.coffee 
Error: Cannot find module 'glob'
    at loadModule (node.js:275:15)
    at require (node.js:411:14)
    at Object.<anonymous> (/Users/jason/dev/capt/src/main.coffee:6:10)
    at Object.<anonymous> (/Users/jason/dev/capt/src/main.coffee:208:4)
    at Module._compile (node.js:462:23)
    at Object.run (/usr/local/lib/node/.npm/coffee-script/1.0.0/package/lib/coffee-script.js:57:19)
    at /usr/local/lib/node/.npm/coffee-script/1.0.0/package/lib/command.js:120:29
    at /usr/local/lib/node/.npm/coffee-script/1.0.0/package/lib/command.js:83:26
    at fs:84:13
    at node.js:773:9

Thanks for any help! -Jason

jasonm commented 13 years ago

Hmm, as recommended by jashkenas on IRC, I tried installing node and npm from scratch, and then coffee via npm. I still get similar issues: https://gist.github.com/c2b284befcc09ec65307

jasonm commented 13 years ago

OK, so I think I've solved it - I made sure to install coffee-script via npm, and things seem to work now. I also had to npm install glob - not sure if it's preferable to specify that in the README or to include glob.js in lib/ ?

bnolan commented 13 years ago

I'll add a note to the README saying that you need glob.js. It's recommended you install capt using npm, as the dependencies may change over time.