{"record":{"id":"c8851a60ba95fd50","repo":"facebook/react","slug":"could-not-find-the-module-modulepath-in-the-r","errorCode":null,"errorMessage":"Could not find the module \"${modulePath}\" in the React Client Manifest. This is probably a bug in the React Server Components bundler.","messagePattern":"Could not find the module \"(.+?)\" in the React Client Manifest\\. This is probably a bug in the React Server Components bundler\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-server-dom-turbopack/src/server/ReactFlightServerConfigTurbopackBundler.js","lineNumber":66,"sourceCode":"): ClientReferenceMetadata {\n  const modulePath = clientReference.$$id;\n  let name = '';\n  let resolvedModuleData = config[modulePath];\n  if (resolvedModuleData) {\n    // The potentially aliased name.\n    name = resolvedModuleData.name;\n  } else {\n    // We didn't find this specific export name but we might have the * export\n    // which contains this name as well.\n    // TODO: It's unfortunate that we now have to parse this string. We should\n    // probably go back to encoding path and name separately on the client reference.\n    const idx = modulePath.lastIndexOf('#');\n    if (idx !== -1) {\n      name = modulePath.slice(idx + 1);\n      resolvedModuleData = config[modulePath.slice(0, idx)];\n    }\n    if (!resolvedModuleData) {\n      throw new Error(\n        'Could not find the module \"' +\n          modulePath +\n          '\" in the React Client Manifest. ' +\n          'This is probably a bug in the React Server Components bundler.',\n      );\n    }\n  }\n  if (resolvedModuleData.async === true && clientReference.$$async === true) {\n    throw new Error(\n      'The module \"' +\n        modulePath +\n        '\" is marked as an async ESM module but was loaded as a CJS proxy. ' +\n        'This is probably a bug in the React Server Components bundler.',\n    );\n  }\n  if (resolvedModuleData.async === true || clientReference.$$async === true) {\n    return [resolvedModuleData.id, resolvedModuleData.chunks, name, 1];\n  } else {","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-server-dom-turbopack/src/server/ReactFlightServerConfigTurbopackBundler.js#L48-L84","documentation":"When the Flight server serializes a 'use client' reference, resolveClientReferenceMetadata looks up the reference's $$id (e.g. 'path/to/module.tsx#exportName') in the React Client Manifest produced by the Turbopack React Server Components bundler. If neither the full key nor the module portion before the last '#' exists in the manifest, serialization cannot map the component to a chunk id, so React throws and blames the bundler: a manifest that omits a module the server graph references is a bundler bug, not a user error.","triggerScenarios":"renderToPipeableStream/renderToReadableStream reaches a client component whose id is missing from the client manifest config: config[modulePath] is undefined AND config[modulePath.slice(0, lastIndexOf('#'))] is also undefined (no '*' style fallback entry either).","commonSituations":"Server and client bundles produced by different/stale builds (reused .next or turbopack cache); a client manifest from a previous compile served to a freshly built server; framework canary (Next.js + Turbopack) bugs that drop manifest entries; mixing react-server-dom-turbopack builds with an incompatible bundler version.","solutions":["Delete all build artifacts and bundler caches (.next, .turbo, node_modules/.cache) and rebuild so the client manifest and bundles are generated in one pass.","Verify the server runtime consumes the client manifest emitted by the same build that compiled the server bundle (never persist a manifest across builds in CI or Docker layers).","Align versions: use the react-server-dom-turbopack build shipped with your framework version instead of pinning a mismatched React canary.","If it reproduces from a clean build, print the missing modulePath, diff it against the manifest keys, and report it as a bug to the React/Turbopack (or framework) repository."],"exampleFix":"# before: stale manifest reused across builds\nCOPY .next/ .next/\nnode server.js\n\n# after: always rebuild server + client manifest together\nRUN pnpm build\nnode server.js","handlingStrategy":"try-catch","validationCode":"// Before rendering, verify every referenced client id resolves in the manifest\nfunction assertClientReferences(manifest, clientIds) {\n  for (const id of clientIds) {\n    if (!manifest[id] && !manifest[id.slice(0, id.lastIndexOf('#'))]) {\n      throw new Error('Client manifest is missing entry: ' + id);\n    }\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  const stream = renderToPipeableStream(<App />, {onError});\n  stream.pipe(res);\n} catch (e) {\n  if (/Could not find the module .* in the React Client Manifest/.test(String(e.message))) {\n    // stale/mismatched build: fail loudly, trigger a clean rebuild\n    console.error('RSC client manifest out of sync - rebuild server+client together');\n  }\n  throw e;\n}","preventionTips":["Generate the client manifest and server bundle in the same build step; never cache one without the other.","Clear .next / turbopack caches when switching framework or React canary versions.","Log the missing modulePath from onError so mismatches are diagnosable in CI."],"tags":["rsc","react-server-components","turbopack","bundler","client-manifest","serialization"],"backgroundTag":"rsc-client-manifest-module-not-found","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}