Closed steve-gray closed 8 years ago
Fix located/submitted:
https://github.com/SitePen/remap-istanbul/pull/59
The issue is that the various permutations of babel transforms I'm dealing with don't always have originating lines in the source file that they belong to. These nodes come through the remap operation with the 'skip' flag, but the code ploughs on and just attempts to remap them anyway, causing the underlying soucemaps helper classes to fail with the error in my post.
-Steve
Hey @kitsonk, is there any chance of getting this published as a patch soon-ish? Otherwise I'm going to need to pump out a hacked-up version for a project :(
I will try to make time today... Though no guarantees. Thanks for all your input!
I also have this error in svelte. But I haven't found the answer. Please contact me.
I also have this error in svelte. But I haven't found the answer. Please contact me.
Same
I also have this error in svelte. But I haven't found the answer. Please contact me.
me toooo
Situation:
Stack trace:
TypeError: Line must be greater than or equal to 1, got 0 at SourceMapConsumer_findMapping as _findMapping at SourceMapConsumer_originalPositionFor as originalPositionFor at getMapping (/Users/steveg/Desktop/workspace/steve-standards/node_modules/remap-istanbul/lib/remap.js:66:25) at /Users/steveg/Desktop/workspace/steve-standards/node_modules/remap-istanbul/lib/remap.js:264:20 at Array.forEach (native) at /Users/steveg/Desktop/workspace/steve-standards/node_modules/remap-istanbul/lib/remap.js:262:44 at Array.forEach (native) at /Users/steveg/Desktop/workspace/steve-standards/node_modules/remap-istanbul/lib/remap.js:182:22 at Array.forEach (native) at remap (/Users/steveg/Desktop/workspace/steve-standards/node_modules/remap-istanbul/lib/remap.js:181:12)
Cover task:
Test task:
Instrumented code:
Babel intermediate:
The sourcemap:
And then the coverage-final that's generated: