-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
Description
Read on a few websites that just running 'coffee app.coffee' should generate source maps and print out correct debugging information.
Taken from another website, the simple example:
1 test = ->
2 people =
3 john:
4 first_name: 'john'
5 last_name: 'doe'
6 mary:
7 first_name: 'mary'
8 last_name: 'jane'
9
10 console.log("Welcome", people[p].first_name, people[p].last_name, "!!!") for p in ['john', 'mary', 'josh']
11
12 process.nextTick test
When run with coffee test.coffee I get the following error
Welcome john doe !!!
Welcome mary jane !!!
/home/pi/onkyo/nodejs-onkyoserial/test.coffee:20
results.push(console.log("Welcome", people[p].first_name, people[p].last_name, "!!!"));
^
TypeError: Cannot read property 'first_name' of undefined
at test (/home/pi/onkyo/nodejs-onkyoserial/test.coffee:20:52)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:607:11)
at run (bootstrap_node.js:420:7)
at startup (bootstrap_node.js:139:9)
at bootstrap_node.js:535:3
Shows the error on test.coffee line 20, but there are only 12 lines in the file. I tried compiling it with a source map (-m) as well as with an inline map (-M) and running the resulting .js file through node, and still get errors on or around line 20.
Running coffee-script 1.12.2
gizzyegizzye