{"record":{"id":"61a67959e65c85f9","repo":"facebook/react","slug":"156","errorCode":"156","errorMessage":"Unknown unit of work tag (${workInProgress.tag}). This error is likely caused by a bug in React. Please file an issue.","messagePattern":"Unknown unit of work tag \\((.+?)\\)\\. This error is likely caused by a bug in React\\. Please file an issue\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-reconciler/src/ReactFiberBeginWork.js","lineNumber":4508,"sourceCode":"          renderLanes,\n        );\n      }\n      break;\n    }\n    case ViewTransitionComponent: {\n      if (enableViewTransition) {\n        return updateViewTransition(current, workInProgress, renderLanes);\n      }\n      break;\n    }\n    case Throw: {\n      // This represents a Component that threw in the reconciliation phase.\n      // So we'll rethrow here. This might be a Thenable.\n      throw workInProgress.pendingProps;\n    }\n  }\n\n  throw new Error(\n    `Unknown unit of work tag (${workInProgress.tag}). This error is likely caused by a bug in ` +\n      'React. Please file an issue.',\n  );\n}\n\nexport {beginWork};\n","sourceCodeStart":4490,"sourceCodeEnd":4515,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-reconciler/src/ReactFiberBeginWork.js#L4490-L4515","documentation":"beginWork() dispatches on fiber.tag for every unit-of-work type it knows and falls through to this throw for any unrecognized numeric tag. Fiber tags are private to one copy of the reconciler, so an unmatched tag means the fiber tree was produced by different React internals than the code walking it, or the tree was corrupted.","triggerScenarios":"Two copies of react/react-reconciler in one bundle where one writes fibers and the other renders them (react 19 with react-dom 18, stable mixed with canary); a custom renderer (react-three-fiber, ink, react-pdf) whose pinned react-reconciler emits or consumes tags the paired build does not know; external code mutating fiber internals.","commonSituations":"Incremental React upgrades in monorepos; lockfiles hoisting multiple reconciler versions; libraries with narrow react-reconciler peer ranges; stale bundler/HMR module instances kept alive after an upgrade.","solutions":["Run npm ls react react-dom (or the yarn/pnpm equivalent) and dedupe to exactly one copy of each at one version","Upgrade custom-renderer packages so their react-reconciler matches your react version","Clear node_modules, the bundler cache, and hard-reload to drop stale HMR modules","If versions are aligned, file an issue including the tag number from the message"],"exampleFix":"// before - transitive dep hoists a second react-dom 18\n// after - force one resolution in package.json\n\"overrides\": {\n  \"react\": \"19.2.0\",\n  \"react-dom\": \"19.2.0\"\n}","handlingStrategy":"validation","validationCode":"import {version} from 'react';\nimport * as reconciler from 'react-reconciler';\nif (reconciler.version && reconciler.version.split('.')[0] !== version.split('.')[0]) {\n  throw new Error(`react ${version} + react-reconciler ${reconciler.version}: dedupe required`);\n}","typeGuard":null,"tryCatchPattern":"If it still throws at runtime, capture via onUncaughtError with the tag number from the message - that number identifies which fiber type the mismatched copy emitted.","preventionTips":["Set npm overrides or yarn resolutions so only one react version resolves","Upgrade custom-renderer libraries together with react","Purge node_modules and bundler caches after React upgrades to drop stale modules"],"tags":["version-mismatch","fiber","bundler","reconciler"],"backgroundTag":"duplicate-react-versions","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}