facebook/react · error · Error

Use react-server-dom-parcel/client instead.

Error message

Use react-server-dom-parcel/client instead.

What it means

react-server-dom-parcel's root export is a deliberate guard: the package is only usable through its subpath entries — './client' in browser/edge/node runtimes and './server' under the react-server condition. Importing the bare package name always evaluates this throw, redirecting you to the client entry.

Source

Thrown at packages/react-server-dom-parcel/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-parcel/client instead.');

View on GitHub (pinned to eafeac097b)

Solutions

  1. Import from 'react-server-dom-parcel/client' for the browser, edge, or node client
  2. On the server use 'react-server-dom-parcel/server' under --conditions react-server
  3. Fix auto-import or TypeScript path config so the root specifier is never suggested

Example fix

// before
import {createFromFetch} from 'react-server-dom-parcel';

// after
import {createFromFetch} from 'react-server-dom-parcel/client';
Defensive patterns

Strategy: validation

Validate before calling

// eslint.config.js — fail the root specifier at lint time
export default [
  {
    rules: {
      'no-restricted-imports': ['error', {
        paths: [{
          name: 'react-server-dom-parcel',
          message: "Import 'react-server-dom-parcel/client' or 'react-server-dom-parcel/server' instead",
        }],
      }],
    },
  },
];

Prevention

When it happens

Trigger: importing {createFromFetch} from 'react-server-dom-parcel' (root specifier); editor auto-import choosing the package name; a bundler resolving the package through its main field instead of the exports map.

Common situations: IDE auto-imports; muscle memory from other Flight packages; early RSC-with-Parcel setups before the entry split was known.

Related errors


AI-assisted analysis of facebook/react@eafeac097b (2026-08-21). Data as JSON: /api/errors/467d7c756b0b89fd. Report an issue: GitHub.