{"record":{"id":"28bfa7d4c68c5288","repo":"gatsbyjs/gatsby","slug":"something-changed-in-webpack-but-i-don-t-know-what","errorCode":null,"errorMessage":"something changed in webpack but I don't know what","messagePattern":"something changed in webpack but I don't know what","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/commands/build.ts","lineNumber":436,"sourceCode":"          const component = store.getState().components.get(templatePath)\n          if (component) {\n            const action = {\n              type: `SET_SSR_TEMPLATE_WEBPACK_COMPILATION_HASH`,\n              payload: {\n                templatePath,\n                templateHash,\n                pages: component.pages,\n                isSlice: component.isSlice,\n              },\n            }\n            store.dispatch(action)\n          } else {\n            console.error({\n              templatePath,\n              templateHash,\n              availableTemplates: [...store.getState().components.keys()],\n            })\n            throw new Error(\n              `something changed in webpack but I don't know what`\n            )\n          }\n        }\n      )\n    }\n\n    if (state.html.ssrCompilationHash !== webpackSSRCompilationHash) {\n      store.dispatch({\n        type: `SET_SSR_WEBPACK_COMPILATION_HASH`,\n        payload: webpackSSRCompilationHash,\n      })\n    }\n  }\n\n  await flushPendingPageDataWrites(buildSpan)\n  markWebpackStatusAsDone()\n","sourceCodeStart":418,"sourceCodeEnd":454,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby/src/commands/build.ts#L418-L454","documentation":"In Gatsby v5 with `GATSBY_SLICES` enabled, after webpack emits SSR template hashes Gatsby expects every emitted `templatePath` to exist in the Redux `components` map. A missing entry means webpack produced a template the runtime registry does not know about, so the message literally admits the cause is unknown.","triggerScenarios":"`process.env.GATSBY_SLICES` is set; the `templateCompilationHashes` iteration hits a `templatePath` for which `store.getState().components.get(templatePath)` returns `undefined`.","commonSituations":"Experimental/preview Slices feature mismatched with plugin or Gatsby versions; stale `.cache` after enabling Slices; a third-party template/SSR plugin registering templates differently.","solutions":["Clear `.cache` and `public` and rebuild.","Confirm Slices support matches across your Gatsby core and any SSR/slice plugins.","If you do not need Slices, unset `GATSBY_SLICES`.","Capture the `console.error` output (templatePath, hash, availableTemplates) and file a Gatsby issue."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// In CI, decide Slices support explicitly and fail fast on mismatch.\nif (process.env.GATSBY_SLICES && !supportsSlices(gatsbyVersion)) {\n  throw new Error(\"GATSBY_SLICES set but Gatsby version does not support it\")\n}\n","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat Slices as experimental: clear `.cache` whenever you toggle it.","Keep Gatsby core and SSR/slice plugins version-aligned.","Do not enable Slices in production pipelines until validated on a clean build."],"tags":["gatsby","build","webpack","slices","internal","experimental"],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}