{"record":{"id":"06f08a2d7768b159","repo":"facebook/react","slug":"use-react-server-dom-turbopack-client-instead","errorCode":null,"errorMessage":"Use react-server-dom-turbopack/client instead.","messagePattern":"Use react-server-dom-turbopack/client instead\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/react-server-dom-turbopack/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-turbopack/client instead.');\n","sourceCodeStart":1,"sourceCodeEnd":11,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-server-dom-turbopack/index.js#L1-L11","documentation":"The root entry of react-server-dom-turbopack contains only this throw: the package deliberately ships no default implementation. The Flight runtime is split into environment-specific entries (client, server) and every consumer must deep-import the entry it needs.","triggerScenarios":"import ... from 'react-server-dom-turbopack' (the bare package specifier), most often in code ported from react-server-dom-webpack where a root entry previously existed, or inserted by editor autocomplete.","commonSituations":"Copying RSC examples written for the webpack integration; upgrading scaffolds that assumed a root export; shared utilities importing the package generically.","solutions":["Change the import to react-server-dom-turbopack/client","For server rendering use the server entry (e.g. react-server-dom-turbopack/server) under the react-server condition","Search the codebase for the bare specifier and add an import lint rule banning it"],"exampleFix":"// before\nimport {createFromFetch} from 'react-server-dom-turbopack';\n\n// after\nimport {createFromFetch} from 'react-server-dom-turbopack/client';","handlingStrategy":"validation","validationCode":"// Always use a subpath entry; assert it if resolving dynamically:\nconst spec = 'react-server-dom-turbopack/client';\nif (!spec.includes('/')) {\n  throw new Error('Deep-import a specific react-server-dom-turbopack entry');\n}\nconst {createFromFetch} = require(spec);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Import from the environment entry (.../client, .../server.node) everywhere","Add an ESLint no-restricted-imports rule banning the bare specifier","Codemod away from webpack-style root imports when adopting turbopack"],"tags":["react-server-components","turbopack","package-exports","import-time-error"],"backgroundTag":"invalid-package-entrypoint","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}