jakejs / jake

JavaScript build tool, similar to Make or Rake. Built to work with Node.js.
http://jakejs.com
Apache License 2.0
1.97k stars 190 forks source link

Very useless error message #291

Open adius opened 9 years ago

adius commented 9 years ago
Error: Uncaught, unspecified "error" event.
    at Error (native)
    at emit (events.js:87:13)
    at TaskBase.run (/Users/adrian/Projects/fakesome/node_modules/jake/lib/task/task.js:268:14)
    at TaskBase.handlePrereqComplete (/Users/adrian/Projects/fakesome/node_modules/jake/lib/task/task.js:229:12)
    at null.<anonymous> (/Users/adrian/Projects/fakesome/node_modules/jake/lib/task/task.js:189:16)
    at g (events.js:199:16)
    at emit (events.js:104:17)
    at FileBase.complete (/Users/adrian/Projects/fakesome/node_modules/jake/lib/task/file_task.js:93:10)
    at TaskBase.run (/Users/adrian/Projects/fakesome/node_modules/jake/lib/task/task.js:277:12)
    at TaskBase.runPrereqs (/Users/adrian/Projects/fakesome/node_modules/jake/lib/task/task.js:159:12)
mde commented 9 years ago

Could you provide a little bit more context? Your bug report doesn't provide much more info than the useless error message. :)

hobberwickey commented 8 years ago

I think I can provide some more context because I'm running into this too. Basically, if there's a syntax error in a file(s) and you try to run a jake task you just get an error like

SyntaxError: Unexpected token : at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:387:25)

Which really doesn't help you track anything down. Here's an example:

I have a jake task for launching my server

desc("Start server") task("launch", function(){ jake.exec("nodemon server.js --watch src --watch server.js", {interactive: true}, function(){ complete(); }) })

If there's an error anywhere in my Jakefile I'll have to run the nodemon sever.js... command manually in order to get the location of the syntax error. So somewhere along the lines Jake's swallowing all the error context.

EDIT: Sorry for the crappy formatting