{"record":{"id":"e835f3d573732cef","repo":"facebook/react","slug":"use-react-server-dom-webpack-client-instead","errorCode":null,"errorMessage":"Use react-server-dom-webpack/client instead.","messagePattern":"Use react-server-dom-webpack/client instead\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-server-dom-unbundled/index.js","lineNumber":10,"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\nthrow new Error('Use react-server-dom-webpack/client instead.');\n","sourceCodeStart":1,"sourceCodeEnd":11,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-server-dom-unbundled/index.js#L1-L11","documentation":"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.","triggerScenarios":"`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.","commonSituations":"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.","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."],"exampleFix":"// before\nimport { createFromFetch } from 'react-server-dom-unbundled';\n\n// after\nimport { createFromFetch } from 'react-server-dom-webpack/client';","handlingStrategy":"validation","validationCode":"// Block the wrong specifier at lint time\n// eslint config\n\"no-restricted-imports\": [\"error\", { paths: [{ name: \"react-server-dom-unbundled\", message: \"Use react-server-dom-webpack/client on the client.\" }] }]","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["rsc","react-server-components","unbundled","imports","entry-point"],"backgroundTag":"wrong-rsc-package-entry-point","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}