Closed atombender closed 10 years ago
We actually have a unit test for this, and it passes, so I can't reproduce this. If you are still able to reproduce this, please submit a pull request with a failing unit test and I'll try and get it passing.
Actually the bug disappeared, although I have no idea what I did to fix it — nothing in my own code, but it's possible that a recent Node.js upgrade fixed it, or something else in my package.json
. Thanks, anyway.
It's likely to have been one specific version of browserify that had this bug. Browserify quite frequently fails to properly handle errors. The only way to fix that reliably would be to run it in a separate process, but I don't really want to do that as it would have a massive performance hit.
I also see this same behavior here, unfortunately I'm not sure how to provide what you're looking for to help debug. Essentially any error gets eaten with this exact error trace and I can't tell where to diagnose.
Any syntax error will just re-throw the exception, which will be coming from esprima.js, and break the server:
See https://github.com/substack/node-browserify/issues/308, for example.