facebook/react · critical · Error
Failed to read a RSC payload created by a development versio
Error message
Failed to read a RSC payload created by a development version of React on the server while using a production version on the client. Always use matching versions on the server and the client.
What it means
Flight rows of type 'W' are development-only console-log replays that a __DEV__ React server emits alongside the payload. A production client build has the 'W' handler compiled out, so when it meets such a row it throws with the diagnosis: the payload came from a development server while the client runs production, and versions/modes must match. The error is a hard stop because the client cannot parse the rest of a stream containing dev-only rows.
Source
Thrown at packages/react-client/src/ReactFlightClient.js:5119
if (__DEV__) {
resolveDebugModel(response, id, row);
return;
}
// Fallthrough to share the error with Console entries.
}
case 74 /* "J" */: {
if (enableProfilerTimer && enableAsyncDebugInfo) {
resolveIOInfo(response, id, row);
return;
}
// Fallthrough to share the error with Console entries.
}
case 87 /* "W" */: {
if (__DEV__) {
resolveConsoleEntry(response, row);
return;
}
throw new Error(
'Failed to read a RSC payload created by a development version of React ' +
'on the server while using a production version on the client. Always use ' +
'matching versions on the server and the client.',
);
}
case 82 /* "R" */: {
startReadableStream(response, id, undefined, streamState);
return;
}
// Fallthrough
case 114 /* "r" */: {
startReadableStream(response, id, 'bytes', streamState);
return;
}
// Fallthrough
case 88 /* "X" */: {
startAsyncIterable(response, id, false, streamState);
return;View on GitHub (pinned to eafeac097b)
Solutions
- Run both sides in the same mode: start the server with NODE_ENV=production (with production React), or consume with a dev-mode client build
- Deploy server and client from the same CI artifact so the React channel (dev/prod) and version cannot diverge
- Verify your bundler did not hardcode process.env.NODE_ENV differently on each side
- If you intentionally serialize with dev React (debug tooling), decode with a dev-mode React too, not a production one
Example fix
# before # server started in dev, client bundle built for prod NODE_ENV=development node server.js # emits 'W' rows # after NODE_ENV=production node server.js # prod React on both ends # (or locally: use the dev client bundle against the dev server)
Defensive patterns
Strategy: validation
Validate before calling
// Boot-time consistency guard
const clientDev = process.env.NODE_ENV !== 'production';
// Expose the server's mode (e.g. via a build-time env or health endpoint)
if (typeof SERVER_DEV_MODE !== 'undefined' && SERVER_DEV_MODE !== clientDev) {
throw new Error('Refusing to consume RSC payload: dev/prod mismatch across the boundary');
} Prevention
- Ship server and client from the same CI artifact with a single NODE_ENV
- Assert matching react/react-dom versions in CI (lockfile check across workspace packages)
- Never mix a dev server with production-built client assets
- After each deploy, smoke-test a page that server-logs during render - it emits the 'W' rows that break prod clients
When it happens
Trigger: Server bundle built/run with React in development mode (NODE_ENV != production) while the browser runs a production React build, and the client receives a 'W' (or 'J' console-info) row; typically after the server emits console.log during rendering on the server.
Common situations: Local dev server (dev mode) being consumed by a production-built client bundle for 'realistic' testing; a prod CDN serving stale dev assets or vice versa after a partial deploy; NODE_ENV set inconsistently between the SSR/RSC process and the client bundler; tooling that serializes payloads with dev React for inspection then decodes with prod React.
Related errors
- Invalid reference.
- Missing a temporary reference set but the RSC response retur
- Trying to call a function from "use server" but the callServ
- Values cannot be passed to next() of AsyncIterables passed t
- Type ${typeof value} is not supported as an argument to a Se
AI-assisted analysis of facebook/react@eafeac097b (2026-08-21).
Data as JSON: /api/errors/81a3cad28bba4552.
Report an issue: GitHub.