facebook/react · error · Error
TODO: Implement the server compiler.
Error message
TODO: Implement the server compiler.
What it means
The webpack plugin's constructor accepts isServer as a boolean but only the false path (client reference + manifest compilation) is implemented; passing isServer: true immediately throws 'TODO: Implement the server compiler.' The server side of the RSC pipeline is handled by the node loader/register at runtime, not by this plugin pass.
Source
Thrown at packages/react-server-dom-webpack/src/ReactFlightWebpackPlugin.js:79
serverConsumerManifestFilename?: string,
};
const PLUGIN_NAME = 'React Server Plugin';
export default class ReactFlightWebpackPlugin {
clientReferences: $ReadOnlyArray<ClientReferencePath>;
chunkName: string;
clientManifestFilename: string;
serverConsumerManifestFilename: string;
constructor(options: Options) {
if (!options || typeof options.isServer !== 'boolean') {
throw new Error(
PLUGIN_NAME + ': You must specify the isServer option as a boolean.',
);
}
if (options.isServer) {
throw new Error('TODO: Implement the server compiler.');
}
if (!options.clientReferences) {
this.clientReferences = [
{
directory: '.',
recursive: true,
include: /\.(js|ts|jsx|tsx)$/,
},
];
} else if (
typeof options.clientReferences === 'string' ||
!isArray(options.clientReferences)
) {
this.clientReferences = [options.clientReferences as $FlowFixMe];
} else {
// $FlowFixMe[incompatible-type] found when upgrading Flow
this.clientReferences = options.clientReferences;
}View on GitHub (pinned to eafeac097b)
Solutions
- Set isServer: false; the server bundle does not need this plugin
- Produce the server side via the runtime loader (react-server-dom-webpack/node-loader in module.rules or --loader) plus the generated client manifest
- Track upstream for server-compiler support instead of working around the throw
Example fix
// before
new ReactFlightWebpackPlugin({isServer: process.env.NODE_ENV !== 'browser', ...})
// after (client webpack config only)
new ReactFlightWebpackPlugin({isServer: false, clientReferences: [...]})
// server bundle: no plugin; add the node loader to module.rules instead Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED = new Set(['isServer:false']);
if (options?.isServer === true) {
throw new Error('server compiler pass is not implemented; use the node loader for the server bundle');
} Type guard
function isSupportedPluginOptions(o) {
return o == null || o.isServer !== true; // only the client pass exists
} Prevention
- Only instantiate the plugin in the client webpack config
- Gate the plugin on an explicit isClient flag, not an env-derived boolean
- Watch upstream release notes for the server compiler before enabling isServer: true
When it happens
Trigger: new ReactFlightWebpackPlugin({isServer: true, ...}) — any attempt to make the plugin emit server artifacts.
Common situations: Assuming options must mirror each other for client and server webpack builds | Following architecture docs that describe a server compiler pass that has no implementation yet | Copy-pasting a config template with isServer gated on an env var
Related errors
- React Server Plugin: You must specify the isServer option as
- Could not find the module "${modulePath}" in the React Clien
- The module "${modulePath}" is marked as an async ESM module
- Use react-server-dom-webpack/client instead.
- Use react-server-dom-webpack/client instead.
AI-assisted analysis of facebook/react@eafeac097b (2026-08-21).
Data as JSON: /api/errors/04bd842be251943b.
Report an issue: GitHub.