{"record":{"id":"26bd66002cfe9070","repo":"gatsbyjs/gatsby","slug":"10226","errorCode":"10226","errorMessage":"Couldn't find the \"${context.themeName}\" plugin declared in \"${context.configFilePath}\".\n\nTried looking for a local plugin in ${context.pathToLocalTheme}.\n\nTried looking for an installed package in the following paths:\n${context.nodeResolutionPaths.map(potentialLocationPath => ` - ${potentialLocationPath}`).join(`\\n`)}","messagePattern":"Couldn't find the \"(.+?)\" plugin declared in \"(.+?)\"\\.\n\nTried looking for a local plugin in (.+?)\\.\n\nTried looking for an installed package in the following paths:\n(.+?)`\\)\\.join\\(`\\\\n`\\)\\}","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/bootstrap/load-themes/index.ts","lineNumber":63,"sourceCode":"    // only try to look for local theme in main site\n    // local themes nested in other themes is potential source of problems:\n    // because those are not hosted by npm, there is potential for multiple\n    // local themes with same name that do different things and name being\n    // main identifier that Gatsby uses right now, it's safer not to support it for now.\n    if (isMainConfig) {\n      pathToLocalTheme = path.join(rootDir, `plugins`, themeName)\n      // is a local plugin OR it doesn't exist\n      try {\n        const { resolve } = resolvePlugin(themeName, rootDir)\n        themeDir = resolve\n      } catch (localErr) {\n        reporter.panic(`Failed to resolve ${themeName}`, localErr)\n      }\n    }\n\n    if (!themeDir) {\n      const nodeResolutionPaths = module.paths.map(p => path.join(p, themeName))\n      reporter.panic({\n        id: `10226`,\n        context: {\n          themeName,\n          configFilePath: configFileThatDeclaredTheme,\n          pathToLocalTheme,\n          nodeResolutionPaths,\n        },\n      })\n    }\n  }\n\n  const { configModule, configFilePath } = await getConfigFile(\n    themeDir,\n    `gatsby-config`\n  )\n  const theme:\n    | IGatsbyConfigInput\n    | ((options?: Record<string, unknown>) => IGatsbyConfigInput) =","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/bootstrap/load-themes/index.ts#L45-L81","documentation":"Error \"Couldn't find the \"${context.themeName}\" plugin declared in \"${context.configFilePath}\".\n\nTried looking for a local plugin in ${context.pathToLocalTheme}.\n\nTried looking for an installed package in the following paths:\n${context.nodeResolutionPaths.map(potentialLocationPath => ` - ${potentialLocationPath}`).join(`\\n`)}\" thrown in gatsbyjs/gatsby.","triggerScenarios":"Thrown at packages/gatsby/src/bootstrap/load-themes/index.ts:63 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install the theme package from npm (npm install <themeName>)","Add the theme as a local plugin under <rootDir>/plugins/<themeName>","Check the theme name for typos in gatsby-config.js","Verify the package resolves from one of the listed node resolution paths"],"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-14T05:17:10.506Z"}