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 4f62ab5 commit db051e3Copy full SHA for db051e3
1 file changed
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,
@@ -1647,7 +1648,7 @@ function loadTS(module, filename) {
1647
1648
1649
function reconstructErrorStack(err, parentPath, parentSource) {
1650
const errLine = StringPrototypeSplit(
- StringPrototypeSlice(err.stack, StringPrototypeIndexOf(
1651
+ StringPrototypeSlice(err.stack, StringPrototypeLastIndexOf(
1652
err.stack, ' at ')), '\n', 1)[0];
1653
const { 1: line, 2: col } =
1654
RegExpPrototypeExec(/(\d+):(\d+)\)/, errLine) || [];
0 commit comments