diff --git a/packages/gatsby-cli/src/reporter/prepare-stack-trace.ts b/packages/gatsby-cli/src/reporter/prepare-stack-trace.ts index 3a2ebd7eb67f1..d8ac38f71718f 100644 --- a/packages/gatsby-cli/src/reporter/prepare-stack-trace.ts +++ b/packages/gatsby-cli/src/reporter/prepare-stack-trace.ts @@ -116,7 +116,8 @@ function getPosition({ line: frame.getLineNumber(), source: frame .getFileName() - .substr(frame.getFileName().indexOf(`webpack:`)), + .substr(frame.getFileName().indexOf(`webpack:`)) + .replace(/webpack:\/+/g, `webpack://`), name: null, } }