{"record":{"id":"1d013357dec48cc6","repo":"gatsbyjs/gatsby","slug":"12200","errorCode":"12200","errorMessage":"Tried to create adapter routes for webpack assets but failed. If the issue persists, please open an issue with a reproduction at https://gatsby.dev/bug-report for more help.","messagePattern":"Tried to create adapter routes for webpack assets but failed\\. If the issue persists, please open an issue with a reproduction at https://gatsby\\.dev/bug-report for more help\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"packages/gatsby/src/utils/adapter/manager.ts","lineNumber":486,"sourceCode":"      path: staticQueryResultPath,\n      pathToFillInPublicDir: staticQueryResultPath,\n      headers: MUST_REVALIDATE_HEADERS,\n    })\n  }\n\n  // app-data.json\n  {\n    const appDataFilePath = posix.join(`page-data`, `app-data.json`)\n    addStaticRoute({\n      path: appDataFilePath,\n      pathToFillInPublicDir: appDataFilePath,\n      headers: MUST_REVALIDATE_HEADERS,\n    })\n  }\n\n  // webpack assets\n  if (!webpackAssets) {\n    reporter.panic({\n      id: `12200`,\n      context: {},\n    })\n  }\n\n  for (const asset of webpackAssets) {\n    addStaticRoute({\n      path: asset,\n      pathToFillInPublicDir: asset,\n      headers: PERMAMENT_CACHING_HEADERS,\n    })\n  }\n\n  // chunk-map.json\n  {\n    const chunkMapFilePath = posix.join(`chunk-map.json`)\n    addStaticRoute({\n      path: chunkMapFilePath,","sourceCodeStart":468,"sourceCodeEnd":504,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby/src/utils/adapter/manager.ts#L468-L504","documentation":"When using a Gatsby adapter (custom hosting integration, e.g. Gatsby Cloud, Firebase, AWS), Gatsby generates routes for webpack assets during the adapter route-creation phase. If the webpackAssets collection is null or undefined at that point, the adapter cannot register static routes for JS/CSS bundles, so it panics with error code 12200.","triggerScenarios":"The webpackAssets variable is falsy when createAdapterRoutes (or equivalent) reaches the webpack-assets loop. This means the build state was not populated with the list of emitted webpack assets -- typically because an earlier build step (webpack compilation / stats extraction) failed or was skipped.","commonSituations":"Using a custom adapter or gatsby-plugin adapter integration where the build did not produce webpack stats. A build that bypassed or failed the HTML/JS compilation phase. Adapter misconfiguration or version incompatibility between Gatsby core and the adapter package.","solutions":["Ensure a full successful `gatsby build` ran before the adapter route creation phase -- check for earlier build errors in the log.","Update the adapter package and Gatsby core to mutually compatible latest versions.","Run `gatsby clean` and rebuild from scratch.","If writing a custom adapter, ensure the build context includes webpackAssets before route creation -- verify the adapter API contract."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Verify webpack assets exist before adapter route creation\nfunction validateWebpackAssetsForAdapter(buildContext) {\n  if (!buildContext.webpackAssets || !Array.isArray(buildContext.webpackAssets)) {\n    throw new Error('webpackAssets not populated -- ensure full build ran before adapter routes')\n  }\n  if (buildContext.webpackAssets.length === 0) {\n    console.warn('webpackAssets is empty -- check for earlier build failures')\n  }\n}","typeGuard":"function hasWebpackAssets(ctx) {\n  return (\n    typeof ctx === 'object' &&\n    ctx !== null &&\n    Array.isArray(ctx.webpackAssets) &&\n    ctx.webpackAssets.length > 0\n  )\n}","tryCatchPattern":null,"preventionTips":["Ensure a full successful gatsby build before adapter route creation.","Keep adapter packages and Gatsby core at compatible versions.","Run gatsby clean to eliminate stale state.","Check for earlier errors in the build log that prevented webpack stats collection."],"tags":["adapter","webpack","build","routes","assets"],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}