facebook/react · error · Error
Use react-server-dom-webpack/client instead.
Error message
Use react-server-dom-webpack/client instead.
What it means
The package root of react-server-dom-unbundled is not a usable entry point. This runtime is the server-side, bundler-less Flight implementation driven by the Node loader; code running on the browser must use the client of the webpack-based runtime instead. Importing 'react-server-dom-unbundled' directly resolves to this stub, which throws to redirect you to the correct client entry.
Source
Thrown at packages/react-server-dom-unbundled/index.js:10
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
throw new Error('Use react-server-dom-webpack/client instead.');
View on GitHub (pinned to eafeac097b)
Solutions
- Change client-side imports to `react-server-dom-webpack/client` as the message says.
- Keep `react-server-dom-unbundled/server` imports only inside react-server conditioned server code.
- Add an ESLint no-restricted-imports rule banning the bare 'react-server-dom-unbundled' specifier.
Example fix
// before
import { createFromFetch } from 'react-server-dom-unbundled';
// after
import { createFromFetch } from 'react-server-dom-webpack/client'; Defensive patterns
Strategy: validation
Validate before calling
// Block the wrong specifier at lint time
// eslint config
"no-restricted-imports": ["error", { paths: [{ name: "react-server-dom-unbundled", message: "Use react-server-dom-webpack/client on the client." }] }] Prevention
- Always import the /client or /server subpath, never the package root.
- Use the same RSC runtime package on both sides of the boundary.
- Let the ESLint rule above catch stray root imports in review.
When it happens
Trigger: `import ... from 'react-server-dom-unbundled'` (the root export) anywhere in a bundle, typically client/browser code or an isomorphic module that got resolved to the package root.
Common situations: Autocomplete or cargo-culted imports picking the package root; shared isomorphic code importing the wrong specifier; migration from react-server-dom-webpack where root imports happened to work differently.
Related errors
- Use react-server-dom-unbundled/client instead.
- The React Server Writer cannot be used outside a react-serve
- The React Server Writer cannot be used outside a react-serve
- The React Server cannot be used outside a react-server envir
- The source map has more mappings than there are lines.
AI-assisted analysis of facebook/react@eafeac097b (2026-08-21).
Data as JSON: /api/errors/e835f3d573732cef.
Report an issue: GitHub.