Open basarat opened 8 years ago
The basic issue is that the code hotfix for https://github.com/evanw/node-source-map-support/issues/36 assumes that there will be (function (exports, require, module, __filename, __dirname) {
at the head of my file. That is not the case I am seeing in my invocation. Below I am logging out the line,column at https://github.com/evanw/node-source-map-support/blob/d8d1a8c14d35f15ac722a2d04b636cedf58f9fd3/source-map-support.js#L321 along with file at originalPositionFor
{ line: 1, column: 0 }
{ source: 'D:\\REPOS\\alm\\src\\tests\\testedTest.ts',
line: 1,
column: -62 }
My file starts with a call to describe
hence line 1
column 0
:rose:
A PR fix for this exists : https://github.com/evanw/node-source-map-support/pull/138 :rose:
Didn't work with node 5.2.0. But works with 5.10.1.
Having two machines with different OSes / nodejs versions helped me figure that out :). I'll also try newer node version once they are more stable
The issue is still present in Jest
TypeError: Column must be greater than or equal to 0, got -32
=> Found "source-map-support@0.5.13"
info Reasons this module exists
- "jest#@jest#core#jest-runner" depends on it
- Hoisted from "jest#@jest#core#jest-runner#source-map-support"
UPD: I switched to vitest
Also still experience this on jest version 29.7.0
Stack trace :
Tracked it down to https://github.com/evanw/node-source-map-support/blob/d8d1a8c14d35f15ac722a2d04b636cedf58f9fd3/source-map-support.js#L323-L325 moving it to
-62
.More
The code I am working on is available here : https://github.com/alm-tools/alm/pull/181. However might be easiest to just ask me to log whatever you want and I'll send it throught :rose: