{"record":{"id":"73c9732ad0eca191","repo":"gatsbyjs/gatsby","slug":"couldn-t-find-async-requires-module","errorCode":null,"errorMessage":"couldn't find async-requires module","messagePattern":"couldn't find async-requires module","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/utils/webpack/plugins/partial-hydration.ts","lineNumber":289,"sourceCode":"                  // will import it. We don't want to force remove template - we just want to remove the\n                  // import from async-requires and let webpack remove it rom the bundle (or rather just not add it)\n                  // if it's not used anywhere else\n                  compilation.moduleGraph.removeConnection(\n                    connection.dependency\n                  )\n                }\n              }\n            }\n          }\n\n          // find css modules that are imported by this module\n          collectCssModules(module)\n        }\n      }\n    }\n\n    if (!asyncRequires) {\n      throw new Error(`couldn't find async-requires module`)\n    }\n\n    const clientSSRLoader = `gatsby/dist/utils/webpack/loaders/client-components-requires-writer-loader?${JSON.stringify(\n      {\n        modules: clientModules\n          .map(\n            module =>\n              `./` +\n              path.relative(\n                compilation.options.context as string,\n                module.userRequest\n              )\n          )\n          .join(`,`),\n      }\n    )}!`\n\n    const clientComponentEntryDep = webpack.EntryPlugin.createDependency(","sourceCodeStart":271,"sourceCodeEnd":307,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/utils/webpack/plugins/partial-hydration.ts#L271-L307","documentation":"After the partial-hydration webpack plugin rewrote module connections, the async-requires module could not be located in the compilation. It is a build-internal invariant — the client entries depend on that module existing — typically caused by a compiler hook ordering issue or unusual bundling config.","triggerScenarios":"Thrown at packages/gatsby/src/utils/webpack/plugins/partial-hydration.ts:289 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Disable partial hydration (engines.experimental | functions) if unneeded","Update Gatsby to a version fixing partial-hydration module resolution","Inspect webpack config overrides that remove async-requires"],"exampleFix":null,"handlingStrategy":"type-guard","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"}