gatsbyjs/gatsby · error
10123
10123
Error message
We encountered an error while trying to load your site's ${context.configName}. Please fix the error and try again. What it means
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.
Source
Thrown at packages/gatsby/src/bootstrap/get-config-file.ts:101
}
async function attemptImportUncompiled(
siteDirectory: string,
configName: string,
distance: number
): Promise<{
configModule: unknown
configFilePath: string
}> {
let uncompiledResult
const uncompiledConfigPath = path.join(siteDirectory, configName)
try {
uncompiledResult = await attemptImport(siteDirectory, uncompiledConfigPath)
} catch (error) {
if (!testImportError(uncompiledConfigPath, error)) {
report.panic({
id: `10123`,
error,
context: {
configName,
message: error.message,
},
})
}
}
if (uncompiledResult?.configFilePath) {
return uncompiledResult
}
const error = new Error(`Cannot find package '${uncompiledConfigPath}'`)
const { tsConfig, nearMatch } = await checkTsAndNearMatch(
siteDirectory,View on GitHub (pinned to e85d62f177)
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
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at packages/gatsby/src/bootstrap/get-config-file.ts:101 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gatsbyjs/gatsby@e85d62f177 (2026-08-26).
Data as JSON: /api/errors/fd373cf39ec8fa43.
Report an issue: GitHub.