{"record":{"id":"fd373cf39ec8fa43","repo":"gatsbyjs/gatsby","slug":"10123","errorCode":"10123","errorMessage":"We encountered an error while trying to load your site's ${context.configName}. Please fix the error and try again.","messagePattern":"We encountered an error while trying to load your site's (.+?)\\. Please fix the error and try again\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/bootstrap/get-config-file.ts","lineNumber":101,"sourceCode":"}\n\nasync function attemptImportUncompiled(\n  siteDirectory: string,\n  configName: string,\n  distance: number\n): Promise<{\n  configModule: unknown\n  configFilePath: string\n}> {\n  let uncompiledResult\n\n  const uncompiledConfigPath = path.join(siteDirectory, configName)\n\n  try {\n    uncompiledResult = await attemptImport(siteDirectory, uncompiledConfigPath)\n  } catch (error) {\n    if (!testImportError(uncompiledConfigPath, error)) {\n      report.panic({\n        id: `10123`,\n        error,\n        context: {\n          configName,\n          message: error.message,\n        },\n      })\n    }\n  }\n\n  if (uncompiledResult?.configFilePath) {\n    return uncompiledResult\n  }\n\n  const error = new Error(`Cannot find package '${uncompiledConfigPath}'`)\n\n  const { tsConfig, nearMatch } = await checkTsAndNearMatch(\n    siteDirectory,","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/bootstrap/get-config-file.ts#L83-L119","documentation":"Fires when attemptImport of the uncompiled config file throws and testImportError rules out an ordinary module-not-found error — meaning the file exists but fails at import time (syntax error, unresolved import, or a runtime throw at module scope). The real cause is the attached error, the panic text is only a generic wrapper.","triggerScenarios":"Thrown at packages/gatsby/src/bootstrap/get-config-file.ts:101 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the error shown in error.message inside gatsby-config/gatsby-node","Check that every import in the config file resolves","Ensure the file has a valid default export"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}