{"record":{"id":"a1a067e414bed835","repo":"facebook/react","slug":"use-react-server-dom-webpack-client-instead-a1a067","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-webpack/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-webpack/client instead.');\n","sourceCodeStart":1,"sourceCodeEnd":13,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-server-dom-webpack/npm/index.js#L1-L13","documentation":"The npm/ copy of the webpack package's root index.js throws the same 'Use react-server-dom-webpack/client instead.' guard as the source index.js — it is the entry published for consumers who import the package root. The package intentionally has no root implementation; every consumer must pick the client, server, or static subpath matched to its runtime condition.","triggerScenarios":"require('react-server-dom-webpack') from installed node_modules (any Node process, test, or tool that resolves the package root).","commonSituations":"Upgrading from very old versions where the root re-exported client APIs | SSR frameworks or starter templates importing the root in shared code | Node scripts that render RSC payloads using the root import","solutions":["Change the import to 'react-server-dom-webpack/client' for payload consumption","Use 'react-server-dom-webpack/server' (+ --conditions react-server) for serialization","If a dependency imports the root, update it or file an issue — the fix is always the subpath"],"exampleFix":"// before\nconst {createFromNodeStream} = require('react-server-dom-webpack');\n\n// after\nconst {createFromNodeStream} = require('react-server-dom-webpack/client.node');","handlingStrategy":"validation","validationCode":"// Check dependencies' imports before shipping\n// package.json script: \"check:imports\": \"grep -r \\\"from 'react-server-dom-webpack'\\\" --include=*.js src || true\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the lint rule from error 367 repo-wide","When upgrading deps, grep for bare package imports in node_modules consumers you control","Prefer subpath imports in all new code"],"tags":["react-server-components","webpack","package-exports","imports"],"backgroundTag":"wrong-package-entry-point","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}