node-source-map-support
node-source-map-support copied to clipboard
Wrong lines when no source map
When in development, we don't generate sourcemaps and use babel-register to dynamically transpile the source code.
I noticed that if we load require('source-map-support').install(); in that context, the error stack shows wrong line numbers.
Is it by design, implying that we should only install source-map-support when we know we're going to have sourcemap files available, or is it a bug in the module ?
I'm having the same problem. Any hits on how this can be solved?
Not only require('source-map-support').install(); will cause the problem, but
import 'source-map-support/register' (which self calls install()) will cause that too. I'm guessing there is something BUG inside the logic. The obvious reason that causes this problem is that trying to call install() multiple times. There should be a condition test to prevent users, especially module devs, from calling that function more than once. @evanw