We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d4fee8 commit 07e16a1Copy full SHA for 07e16a1
lib/internal/modules/cjs/loader.js
@@ -56,6 +56,7 @@ const {
56
StringPrototypeCharCodeAt,
57
StringPrototypeEndsWith,
58
StringPrototypeIndexOf,
59
+ StringPrototypeLastIndexOf,
60
StringPrototypeRepeat,
61
StringPrototypeSlice,
62
StringPrototypeSplit,
@@ -1649,7 +1650,7 @@ function loadTS(module, filename) {
1649
1650
1651
function reconstructErrorStack(err, parentPath, parentSource) {
1652
const errLine = StringPrototypeSplit(
- StringPrototypeSlice(err.stack, StringPrototypeIndexOf(
1653
+ StringPrototypeSlice(err.stack, StringPrototypeLastIndexOf(
1654
err.stack, ' at ')), '\n', 1)[0];
1655
const { 1: line, 2: col } =
1656
RegExpPrototypeExec(/(\d+):(\d+)\)/, errLine) || [];
0 commit comments