facebook/react · critical · Error
Could not find the module "${modulePath}" in the React Clien
Error message
Could not find the module "${modulePath}" in the React Client Manifest. This is probably a bug in the React Server Components bundler. What it means
While serializing the RSC payload, the server runtime maps every client reference to [id, chunks, name] using the webpack client manifest configured for the server build (resolveClientReference in ReactFlightServerConfigWebpackBundler.js). Neither the 'modulePath#name' entry (after stripping the '#name' suffix) nor the bare module exists in that manifest, so React cannot tell the browser how to load the component and reports an RSC bundler bug.
Source
Thrown at packages/react-server-dom-webpack/src/server/ReactFlightServerConfigWebpackBundler.js:66
): ClientReferenceMetadata {
const modulePath = clientReference.$$id;
let name = '';
let resolvedModuleData = config[modulePath];
if (resolvedModuleData) {
// The potentially aliased name.
name = resolvedModuleData.name;
} else {
// We didn't find this specific export name but we might have the * export
// which contains this name as well.
// TODO: It's unfortunate that we now have to parse this string. We should
// probably go back to encoding path and name separately on the client reference.
const idx = modulePath.lastIndexOf('#');
if (idx !== -1) {
name = modulePath.slice(idx + 1);
resolvedModuleData = config[modulePath.slice(0, idx)];
}
if (!resolvedModuleData) {
throw new Error(
'Could not find the module "' +
modulePath +
'" in the React Client Manifest. ' +
'This is probably a bug in the React Server Components bundler.',
);
}
}
if (resolvedModuleData.async === true && clientReference.$$async === true) {
throw new Error(
'The module "' +
modulePath +
'" is marked as an async ESM module but was loaded as a CJS proxy. ' +
'This is probably a bug in the React Server Components bundler.',
);
}
if (resolvedModuleData.async === true || clientReference.$$async === true) {
return [resolvedModuleData.id, resolvedModuleData.chunks, name, 1];
} else {View on GitHub (pinned to eafeac097b)
Solutions
- Regenerate the client manifest and build the server with it in the same build run
- Confirm the client component participates in the client compilation and its emitted module id matches the manifest key format
- Align react-server-dom-webpack and RSC plugin versions between server and client webpack configs
- In custom integrations, pass the exact manifest emitted alongside the client bundle (clientManifest option)
Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-render sanity check for custom integrations:
function clientRefResolvable(clientManifest, modulePath) {
if (clientManifest[modulePath]) return true;
const idx = modulePath.lastIndexOf('#');
return idx !== -1 && Boolean(clientManifest[modulePath.slice(0, idx)]);
}
// Fail the build/deploy if any referenced client module is missing. Try / catch
let result;
const {pipe, abort} = renderToPipeableStream(<App/>, {
onError(err) {
if (String(err.message).includes('React Client Manifest')) {
// Manifest/build mismatch — log loudly and return a 500; retrying render will not help.
res.statusCode = 500;
}
},
}); Prevention
- Generate the client manifest and build the server in the same build run
- Keep server and client webpack configs in sync (same plugin version, same module id scheme)
- Rebuild fully after adding, renaming, or moving client components
When it happens
Trigger: The server bundle runs with a missing or stale client manifest (ReactServerDOMWebpack plugin clientManifest option); a client component was added, renamed, or moved after the manifest was generated; module ids differ between the build that produced the manifest and the server build (different hashing/aliases); the client file is excluded from the client compilation.
Common situations: Custom webpack/turbopack RSC setups where the server config is missing the client manifest wiring; monorepos whose server and client build configs drift; partial or incremental rebuilds; passing the wrong manifest JSON in render options.
Related errors
- Could not find the module "${metadata[ID]}" in the React Ser
- Could not find the module "${id}" in the React Server Manife
- The module "${modulePath}" is marked as an async ESM module
- Could not find the module "${modulePath}" in the React Clien
- Could not find the module "${modulePath}" in the React Clien
AI-assisted analysis of facebook/react@eafeac097b (2026-08-21).
Data as JSON: /api/errors/3eda5e2791db5f09.
Report an issue: GitHub.