I’m writing a Cakefile that defines a task called build where the following line appears:
coffee.stderr.on 'data', (data) ->
process.stderr.write.data.toString()
When I run the task with cake build, it throws a ReferenceError saying that the function toString is undefined.
I’ve tried repairing the Node installation, and re-installing CoffeeScript with npm.
I believe you want
You’ve got an extra
.in there.The way you’ve written it is trying to call
toString()on thedataproperty of thewritefunction. You’re probably getting an error likeCannot call method 'toString' of undefined.