{"record":{"id":"18c92b284e422e59","repo":"facebook/react","slug":"could-not-find-the-module-metadata-id-in-the-18c92b","errorCode":null,"errorMessage":"Could not find the module \"${metadata[ID]}\" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.","messagePattern":"Could not find the module \"(.+?)\" in the React Server Consumer 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-unbundled/src/client/ReactFlightClientConfigBundlerNode.js","lineNumber":76,"sourceCode":") {\n  prepareDestinationWithChunks(moduleLoading, metadata[CHUNKS], nonce);\n}\n\nexport function resolveClientReference<T>(\n  bundlerConfig: ServerConsumerModuleMap,\n  metadata: ClientReferenceMetadata,\n): ClientReference<T> {\n  const moduleExports = bundlerConfig[metadata[ID]];\n  let resolvedModuleData = moduleExports && moduleExports[metadata[NAME]];\n  let name;\n  if (resolvedModuleData) {\n    // The potentially aliased name.\n    name = resolvedModuleData.name;\n  } else {\n    // If we don't have this specific name, we might have the full module.\n    resolvedModuleData = moduleExports && moduleExports['*'];\n    if (!resolvedModuleData) {\n      throw new Error(\n        'Could not find the module \"' +\n          metadata[ID] +\n          '\" in the React Server Consumer Manifest. ' +\n          'This is probably a bug in the React Server Components bundler.',\n      );\n    }\n    name = metadata[NAME];\n  }\n  return {\n    specifier: resolvedModuleData.specifier,\n    name: name,\n    async: isAsyncImport(metadata),\n  };\n}\n\nexport function resolveServerReference<T>(\n  bundlerConfig: ServerManifest,\n  id: ServerReferenceId,","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-server-dom-unbundled/src/client/ReactFlightClientConfigBundlerNode.js#L58-L94","documentation":"When a Flight (RSC) payload is deserialized on the client, every embedded client reference is resolved as bundlerConfig[metadata[ID]][metadata[NAME]] (with a '*' whole-module fallback) against the React Server Consumer Manifest your bundler generated. This error means the server serialized a client module ID that has no entry in the manifest the client was given, so the client cannot map the reference to a real bundle chunk.","triggerScenarios":"Calling createFromReadableStream/createFromNodeStream (or the unbundled node client's parse / createFromNodeStream) with a bundlerConfig that lacks the module ID present in the stream; consuming a stream produced by a server built with a different client manifest than the one wired into the client; a manifest that was regenerated after the server bundle was built (or vice versa).","commonSituations":"Adding a new 'use client' file and serving a stale manifest; separate server/client build steps where one ran and the other did not; passing the wrong manifest object (e.g. the client manifest instead of the server consumer manifest) into the client options; deploying server and client artifacts from different builds; HMR keeping an old manifest in memory.","solutions":["Rebuild the whole app so the client manifest (serverConsumerManifest) and the server bundle come from the same build, then hard-reload","Verify the client references file is matched by the plugin's clientReferences globs/directories (or has 'use client') so it lands in the manifest","Check that the manifest object you pass to createFrom* on the client is the one your bundler emitted for this build (not a committed, outdated JSON)","If you hand-build RSC streams, assert every client reference ID you serialize on the server exists in the manifest the client uses before shipping"],"exampleFix":"// before: client consumes a stream, manifest comes from a stale file\nimport moduleMap from './manifest.old.json';\ncreateFromReadableStream(stream, {moduleMap});\n\n// after: import the manifest generated by the same build as the server bundle\nimport moduleMap from './build/react-server-consumer-manifest.json';\ncreateFromReadableStream(stream, {moduleMap});","handlingStrategy":"validation","validationCode":"// Before consuming a stream, confirm every module id it will reference resolves\nfunction assertManifestCovers(bundlerConfig, ids) {\n  for (const id of ids) {\n    const mod = bundlerConfig[id];\n    if (!mod || (typeof mod === 'object' && !mod['*'])) {\n      throw new Error(`bundlerConfig is missing module ${id} — regenerate manifests from the same build`);\n    }\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  const root = createFromReadableStream(stream, {moduleMap});\n} catch (e) {\n  if (/Could not find the module .* React Server Consumer Manifest/.test(e.message)) {\n    // deterministic build-skew bug, not transient: fail the deploy check\n    throw new Error('Client/server manifest skew detected: rebuild both bundles together');\n  }\n  throw e;\n}","preventionTips":["Generate client and server manifests in one build step and version them together","Fail CI if any 'use client' file is not present in the emitted manifest","Never commit generated manifests across deploys; always serve them from the current build"],"tags":["react-server-components","bundler","manifest","client-reference","flight"],"backgroundTag":"module-not-found-in-bundler-manifest","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}