{"record":{"id":"ce4830c646540cbb","repo":"remotion-dev/remotion","slug":"version-reactdomversion-of-react-dom-is-not-s","errorCode":null,"errorMessage":"Version ${reactDomVersion} of \"react-dom\" is not supported by Remotion","messagePattern":"Version (.+?) of \"react-dom\" is not supported by Remotion","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/bundler/src/shared-bundler-config.ts","lineNumber":14,"sourceCode":"import {createHash} from 'node:crypto';\nimport path from 'node:path';\nimport ReactDOM from 'react-dom';\nimport {NoReactInternals} from 'remotion/no-react';\nimport {jsonStringifyWithCircularReferences} from './stringify-with-circular-references';\nimport {getWebpackCacheName} from './webpack-cache';\n\nif (!ReactDOM?.version) {\n\tthrow new Error('Could not find \"react-dom\" package. Did you install it?');\n}\n\nconst reactDomVersion = ReactDOM.version.split('.')[0];\nif (reactDomVersion === '0') {\n\tthrow new Error(\n\t\t`Version ${reactDomVersion} of \"react-dom\" is not supported by Remotion`,\n\t);\n}\n\nexport const shouldUseReactDomClient =\n\tNoReactInternals.ENABLE_V5_BREAKING_CHANGES\n\t\t? true\n\t\t: parseInt(reactDomVersion, 10) >= 18;\n\nexport const getResolveConfig = () => ({\n\textensions: ['.ts', '.tsx', '.web.js', '.js', '.jsx', '.mjs', '.cjs'],\n\talias: {\n\t\t// Only one version of react\n\t\t'react/jsx-runtime': require.resolve('react/jsx-runtime'),\n\t\t'react/jsx-dev-runtime': require.resolve('react/jsx-dev-runtime'),\n\t\treact: require.resolve('react'),\n\t\t// Needed to not fail on this: https://github.com/remotion-dev/remotion/issues/5045\n\t\t'remotion/no-react': path.resolve(","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/bundler/src/shared-bundler-config.ts#L1-L32","documentation":"After confirming react-dom has a version, the bundler parses the major version (first dot-segment). If it equals the string '0', it is rejected as unsupported, because no real react-dom release has a 0.x version. This fires when react-dom resolves to a stub, mock, or alien module that reports a bogus version like '0.0.0'.","triggerScenarios":"react-dom resolves to a module whose version string starts with '0' — a test mock, an empty stub, a placeholder package, or a corrupted/partial install reporting an invalid version.","commonSituations":"Module aliases mapping react-dom to a stub for tests; a corrupted node_modules; an override forcing a wrong package; a hand-rolled shim that hardcodes version '0.0.0'.","solutions":["Reinstall a real, supported react-dom (18 or 19) and remove any stub/mock/alias.","Run npm ls react-dom (or bun pm ls) to confirm which package and version actually resolves.","Delete node_modules and the lockfile entries for react-dom and reinstall if the install is corrupted.","Check package.json overrides/resolutions for react-dom and remove stubs."],"exampleFix":"// before: overrides force react-dom to a stub\n// \"overrides\": { \"react-dom\": \"file:./stubs/react-dom-stub\" }\n\n// after\n// \"dependencies\": { \"react-dom\": \"^19.0.0\" }  // and remove the override","handlingStrategy":"validation","validationCode":"import {createRequire} from 'node:module';\nconst require = createRequire(import.meta.url);\nconst assertReactDomVersion = () => {\n  const v = require('react-dom/package.json').version as string;\n  const major = v.split('.')[0];\n  if (major === '0') {\n    throw new Error(`react-dom resolves to version ${v}; install a real react-dom (18 or 19)`);\n  }\n};","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not alias or stub react-dom in production builds.","Run npm ls react-dom (or bun pm ls react-dom) to confirm the resolved package and version.","After removing overrides/stubs, delete node_modules and reinstall.","Treat any react-dom version starting with '0' as a misconfiguration."],"tags":["bundler","react-dom","version","dependencies","module-load"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}