facebook/react · error · Error
320
320
Error message
Expected ReactFiberErrorDialog.showErrorDialog to be a function.
What it means
This file is the Meta-internal (www) build of the react-dom client. It requires the internal ReactFiberErrorDialog module — www's error-reporting integration — and enforces at module initialization that ReactFiberErrorDialogWWW.showErrorDialog is a function. Seeing this throw means an FB-conditional build of react-dom is running where 'ReactFiberErrorDialog' does not resolve to www's implementation.
Source
Thrown at packages/react-dom/src/client/ReactDOMRootFB.js:79
defaultOnCaughtError,
} from 'react-reconciler/src/ReactFiberReconciler';
import {LegacyRoot} from 'react-reconciler/src/ReactRootTags';
import getComponentNameFromType from 'shared/getComponentNameFromType';
import {
current as currentOwner,
isRendering,
} from 'react-reconciler/src/ReactCurrentFiber';
import assign from 'shared/assign';
import noop from 'shared/noop';
// Provided by www
const ReactFiberErrorDialogWWW = require('ReactFiberErrorDialog');
if (typeof ReactFiberErrorDialogWWW.showErrorDialog !== 'function') {
throw new Error(
'Expected ReactFiberErrorDialog.showErrorDialog to be a function.',
);
}
function wwwOnUncaughtError(
error: mixed,
errorInfo: {+componentStack?: ?string},
): void {
const componentStack =
errorInfo.componentStack != null ? errorInfo.componentStack : '';
const logError = ReactFiberErrorDialogWWW.showErrorDialog({
errorBoundary: null,
error,
componentStack,
});
// Allow injected showErrorDialog() to prevent default console.error logging.
// This enables renderers like ReactNative to better manage redbox behavior.View on GitHub (pinned to eafeac097b)
Solutions
- Use the public react-dom package (react-dom/client) instead of the www/FB conditional build
- Inside the www monorepo, fix the module map so ReactFiberErrorDialog resolves to the real implementation
- Audit bundler/Jest aliases for react-dom and ReactFiberErrorDialog and remove stale mappings
- Reinstall dependencies to obtain a clean registry build of react-dom
Example fix
// before (webpack resolve.alias) 'react-dom': path.resolve(__dirname, 'vendor/www/ReactDOMClientFB.js'), // after 'react-dom': false, // let the specifier resolve normally from node_modules
Defensive patterns
Strategy: try-catch
Try / catch
// Detect an internal-build leak at startup with a clear message
try {
await import('react-dom/client');
} catch (e) {
if (e instanceof Error && e.message.includes('ReactFiberErrorDialog')) {
throw new Error('An internal (www) build of react-dom is installed — replace it with the public react-dom package');
}
throw e;
} Prevention
- Never alias react-dom to vendored internal/FB builds in OSS projects
- Pin react-dom to registry versions in package.json and audit vendored copies
- In the www monorepo, verify the module map includes ReactFiberErrorDialog before building
When it happens
Trigger: Loading the www variant of react-dom (sources under packages/react-dom/src/client/ReactDOMRootFB.js / ReactDOMClientFB.js) with module resolution that does not provide the www ReactFiberErrorDialog module — a leaked internal artifact, a bad bundler alias, or a Jest moduleNameMapper resolving that specifier to a stub.
Common situations: OSS apps accidentally pulling a Meta-internal react-dom artifact via alias or vendored copy; monorepo module maps misconfigured so the conditional 'ReactFiberErrorDialog' specifier misses; packages accidentally built from FB-conditional entry points.
Related errors
- react-dom/profiling is not supported in React Server Compone
- This module must be shimmed by a specific renderer.
- This module must be shimmed by a specific renderer.
- 62
- A React form was unexpectedly submitted. If you called form.
AI-assisted analysis of facebook/react@eafeac097b (2026-08-21).
Data as JSON: /api/errors/a72f2b3c0501ecd4.
Report an issue: GitHub.