facebook/react · error · Error
Could not find the module "${metadata[ID]}" in the React Ser
Error message
Could not find the module "${metadata[ID]}" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler. What it means
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.
Source
Thrown at packages/react-server-dom-unbundled/src/client/ReactFlightClientConfigBundlerNode.js:76
) {
prepareDestinationWithChunks(moduleLoading, metadata[CHUNKS], nonce);
}
export function resolveClientReference<T>(
bundlerConfig: ServerConsumerModuleMap,
metadata: ClientReferenceMetadata,
): ClientReference<T> {
const moduleExports = bundlerConfig[metadata[ID]];
let resolvedModuleData = moduleExports && moduleExports[metadata[NAME]];
let name;
if (resolvedModuleData) {
// The potentially aliased name.
name = resolvedModuleData.name;
} else {
// If we don't have this specific name, we might have the full module.
resolvedModuleData = moduleExports && moduleExports['*'];
if (!resolvedModuleData) {
throw new Error(
'Could not find the module "' +
metadata[ID] +
'" in the React Server Consumer Manifest. ' +
'This is probably a bug in the React Server Components bundler.',
);
}
name = metadata[NAME];
}
return {
specifier: resolvedModuleData.specifier,
name: name,
async: isAsyncImport(metadata),
};
}
export function resolveServerReference<T>(
bundlerConfig: ServerManifest,
id: ServerReferenceId,View on GitHub (pinned to eafeac097b)
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
Example fix
// before: client consumes a stream, manifest comes from a stale file
import moduleMap from './manifest.old.json';
createFromReadableStream(stream, {moduleMap});
// after: import the manifest generated by the same build as the server bundle
import moduleMap from './build/react-server-consumer-manifest.json';
createFromReadableStream(stream, {moduleMap}); Defensive patterns
Strategy: validation
Validate before calling
// Before consuming a stream, confirm every module id it will reference resolves
function assertManifestCovers(bundlerConfig, ids) {
for (const id of ids) {
const mod = bundlerConfig[id];
if (!mod || (typeof mod === 'object' && !mod['*'])) {
throw new Error(`bundlerConfig is missing module ${id} — regenerate manifests from the same build`);
}
}
} Try / catch
try {
const root = createFromReadableStream(stream, {moduleMap});
} catch (e) {
if (/Could not find the module .* React Server Consumer Manifest/.test(e.message)) {
// deterministic build-skew bug, not transient: fail the deploy check
throw new Error('Client/server manifest skew detected: rebuild both bundles together');
}
throw e;
} Prevention
- 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
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- Could not find the module "${metadata[ID]}" in the React Ser
- Could not find the module "${modulePath}" in the React Clien
- react-dom/client is not supported in React Server Components
- Attempted to load a Client Module outside the hosted root.
- Invalid server action: ${ref}
AI-assisted analysis of facebook/react@eafeac097b (2026-08-21).
Data as JSON: /api/errors/18c92b284e422e59.
Report an issue: GitHub.