$ coffee --version
CoffeeScript version 1.6.1
$ coffee --compile source.coffee
$ coffee --compile --map source.coffee
TypeError: In source.coffee, Cannot call method 'indexOf' of undefined
at Object.count (~/.npm/lib/node_modules/coffee-script/lib/coffee-script/helpers.js:33:29)
at Object.compile (~/.npm/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:72:30)
at [object Object].<anonymous> (fs.js:123:5)
at [object Object].emit (events.js:64:17)
at Object.oncomplete (fs.js:1181:12)
I'm not sure what is going on here, but if I can do anything to provide more information or narrow it down, let me know.
Would you kindly provide your source code?
I binary searched my code and reduced it down to the crux of the problem:
That causes the exception in the compiler when --map is specified.
Yep, it's a missing @makeCode.
@Nami-Doc: Nice catch. That does indeed seem to be it.
I'm sadly unable to run tests again master right now - when I cake test it fails against cluster.coffee "Unexpected token illegal" on the #. Doesn't seem to get recognized as a coffee file (no clue why ?)
Tests are passing for me on master. Try deleting the directory and cloning it again.
> cake test
# Cluster Module
var compiledWrapper = runInThisContext(wrapper, filename, true);
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:437:25)
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)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
task('build:ultraviolet', 'build and install the Ultraviolet syntax highligh
AssertionError: Expected 1 to equal 0
That's probably windows-related. I'll dig in a bit later.
@Nami-Doc I have exactly the same problem on Mac. Should we discuss this in another issue?
Whoaw, I started to work on something I had to do and I totally dozed off. Sure, open the issue, this'll serve me as a reminder !