{"record":{"id":"dc24ae8195f6fe14","repo":"facebook/react","slug":"use-react-server-dom-parcel-client-instead-dc24ae","errorCode":null,"errorMessage":"Use react-server-dom-parcel/client instead.","messagePattern":"Use react-server-dom-parcel/client instead\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-server-dom-parcel/npm/index.js","lineNumber":12,"sourceCode":"/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n'use strict';\n\nthrow new Error('Use react-server-dom-parcel/client instead.');\n","sourceCodeStart":1,"sourceCodeEnd":13,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-server-dom-parcel/npm/index.js#L1-L13","documentation":"Same guard as the source entry, compiled into the published npm build: react-server-dom-parcel's root entry always throws because the package is only consumable through subpath exports ('./client' in browser/edge/node, './server' under the react-server condition). Reaching this module means the bare package specifier was imported.","triggerScenarios":"import {createFromFetch} from 'react-server-dom-parcel' resolves to npm/index.js and throws at module evaluation; bundler resolves via the main field; auto-import inserts the package root.","commonSituations":"IDE auto-import; migrating from react-server-dom-webpack (whose root also throws); starter templates referencing the package root.","solutions":["Change the import to 'react-server-dom-parcel/client'","Use 'react-server-dom-parcel/server' on the server under --conditions react-server","Add a lint rule (no-restricted-imports) banning the bare specifier"],"exampleFix":"// before\nimport {createFromReadableStream} from 'react-server-dom-parcel';\n\n// after\nimport {createFromReadableStream} from 'react-server-dom-parcel/client';","handlingStrategy":"validation","validationCode":"// eslint.config.js — ban the bare specifier\nexport default [\n  {\n    rules: {\n      'no-restricted-imports': ['error', {\n        paths: [{\n          name: 'react-server-dom-parcel',\n          message: \"Use 'react-server-dom-parcel/client' (or /server under react-server)\",\n        }],\n      }],\n    },\n  },\n];","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Import subpaths only — the root entry is a guard, not an API","Codemod existing imports after upgrading to versions with the guard","Keep the lint rule enabled in CI"],"tags":["react-server-components","parcel","package-exports","imports"],"backgroundTag":"wrong-package-entry-import","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}