how to debug SyntaxError: unexpected INDENT error?

i'm working through the peepcode express tutorial, just trying to follow along and get things running, i'm getting the following error when i run npm start, seems like a coffeescript lib problem, i def don't want to get in the weeds with this, any thoughts on where to go?

[jd@mbp ~/Dropbox/node_projects/tutorials/hot_pie]$ npm start

application-name@0.0.1 start /Users/jd/Dropbox/node_projects/tutorials/hot_pie node server.js

/Users/jd/Dropbox/node_projects/tutorials/hot_pie/node_modules/coffee-script/lib/coffee-   script/helpers.js:199
throw error;
      ^
SyntaxError: unexpected INDENT

Any thoughts? coffescript is version "coffee-script": "~1.6.3" and node is v0.10.13

For debugging syntax errors I suggest compiling your Coffeescript "manually". I've found that sometimes node's automatic compilation confuses things more than helps.

So, in your case:

$ coffee --compile server.coffee

Now, this will create a server.js file (which you'll want to remove to not confuse node). If your coffeescript is invalid coffee will throw an error.

Edit:

To add to this answer, I often syntax check my entire project via the following: I copy all the coffeescript files in my project. My Coffescript source files live in the app/, lib/, config/ and test/ directories in my project. I've created a temp directory, into which I copy all my coffeescript files then try to compile them all.

$ rm -rf temp/*.coffee
$ rm -rf temp/*.js
$ cp app.coffee temp/
$ find test app lib config test  -name "*.coffee" -exec cp \{\} ./temp \;
$ coffee --compile ./temp/