Experience-Monks / devtool

[OBSOLETE] runs Node.js programs through Chromium DevTools
MIT License
3.77k stars 150 forks source link

Module syntax error with shebang #! reports false ParseError #30

Closed mattdesl closed 8 years ago

mattdesl commented 8 years ago

Issue here: https://github.com/Jam3/devtool/issues/29#issuecomment-175297264

I can't reproduce problems with shebang. Running devtool on the following file seems to work fine:

#!/usr/bin/env node
process.stdout.write('foo', () => window.close());
mattdesl commented 8 years ago

Actually this is a problem with syntax-error. The error is not actually coming from shebang, but our "helpful additional error messages" (using acorn) are giving a red flag for the wrong thing.

mattdesl commented 8 years ago

Ok, this misleading error will be fixed once this PR lands: https://github.com/mattdesl/node-syntax-error/commit/13cc3d3573b17da832248f0f0b26a15451f6364d

mattdesl commented 8 years ago

fixed upstream