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 f72c75b commit 5189807Copy full SHA for 5189807
1 file changed
lib/internal/modules/cjs/loader.js
@@ -56,7 +56,6 @@ const {
56
StringPrototypeCharCodeAt,
57
StringPrototypeEndsWith,
58
StringPrototypeIndexOf,
59
- StringPrototypeLastIndexOf,
60
StringPrototypeRepeat,
61
StringPrototypeSlice,
62
StringPrototypeSplit,
@@ -1648,8 +1647,8 @@ function loadTS(module, filename) {
1648
1647
1649
function reconstructErrorStack(err, parentPath, parentSource) {
1650
const errLine = StringPrototypeSplit(
1651
- StringPrototypeSlice(err.stack, StringPrototypeLastIndexOf(
1652
- err.stack, ' at ')), '\n', 1)[0];
+ StringPrototypeSlice(err.stack, StringPrototypeIndexOf(
+ err.stack, ' at ')), '\n', 2)[1];
1653
const { 1: line, 2: col } =
1654
RegExpPrototypeExec(/(\d+):(\d+)\)/, errLine) || [];
1655
if (line && col) {
0 commit comments