Wednesday 19 July 2017

Why won't node show syntax error location?

I thought they would have fixed this by now, but when I require a JS file that happens to have a syntax error in it, node, and specifically the vm.js file says that the line where I require it has the syntax error. That is totally unhelpful to the developer. Is there a work around to show the exact line the syntax error is on in the file? I've tried process.on('exit', function(e) { throw e }); but it seems that that function is never even called. Why wouldn't they add this by now?

Submitted July 19, 2017 at 05:00PM by Flame2057

No comments:

Post a Comment