facebook/react · error · Error
React Server Plugin: You must specify the isServer option as
Error message
React Server Plugin: You must specify the isServer option as a boolean.
What it means
ReactFlightWebpackPlugin validates its constructor options: options.isServer must be present and a boolean, otherwise construction throws. The plugin branches on this flag (client manifest generation vs server compiler), so an undefined/string value — usually a typo'd or missing key — fails fast at webpack config evaluation time.
Source
Thrown at packages/react-server-dom-webpack/src/ReactFlightWebpackPlugin.js:74
type Options = {
isServer: boolean,
clientReferences?: ClientReferencePath | $ReadOnlyArray<ClientReferencePath>,
chunkName?: string,
clientManifestFilename?: string,
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)
) {View on GitHub (pinned to eafeac097b)
Solutions
- Set isServer explicitly as a boolean: isServer: false for the client-manifest pass
- Check for typos in the key and for accidental undefined (e.g. env ? false : undefined)
- Validate options early in your webpack config so mistakes surface with your own message
Example fix
// before
new ReactFlightWebpackPlugin({clientReferences: [...]})
// after
new ReactFlightWebpackPlugin({isServer: false, clientReferences: [...]}) Defensive patterns
Strategy: validation
Validate before calling
// Validate before constructing
function validatePluginOptions(options) {
if (!options || typeof options.isServer !== 'boolean') {
throw new Error('ReactFlightWebpackPlugin requires options.isServer: boolean');
}
return options;
}
new ReactFlightWebpackPlugin(validatePluginOptions(cfg)); Type guard
function areValidPluginOptions(o) {
return o != null && typeof o.isServer === 'boolean';
} Prevention
- Default the key explicitly: {isServer: false, ...spread}
- Type your webpack config (flow/ts) so a missing key fails the build
- Re-check options after config refactors or upgrades
When it happens
Trigger: new ReactFlightWebpackPlugin({}) with no isServer; passing isServer: 'false' (string) or a variable that is undefined; spreading an options object that lacks the key.
Common situations: Copying example configs that omit the option | Config refactors that rename or conditionally delete the key | Version upgrades where the option became required
Related errors
- TODO: Implement the server compiler.
- 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/b86f2e09ea6f1dbc.
Report an issue: GitHub.