diff --git a/packages/hardhat-core/src/internal/core/config/config-loading.ts b/packages/hardhat-core/src/internal/core/config/config-loading.ts index 9951b388e0..4d1cc90863 100644 --- a/packages/hardhat-core/src/internal/core/config/config-loading.ts +++ b/packages/hardhat-core/src/internal/core/config/config-loading.ts @@ -166,7 +166,7 @@ export function analyzeModuleNotFoundError(error: any, configPath: string) { .filter((x) => x.file !== null) .map((x) => x.file!) // ignore frame related to source maps support - .filter((x) => !x.includes("@cspotcode/source-map-support")) + .filter((x) => !x.includes(path.join("@cspotcode", "source-map-support"))) .find((x) => path.isAbsolute(x)); if (throwingFile === null || throwingFile === undefined) {