remotion-dev/remotion · critical · Error
Could not find "react-dom" package. Did you install it?
Error message
Could not find "react-dom" package. Did you install it?
What it means
shared-bundler-config imports react-dom at module load and checks that ReactDOM.version is truthy. If react-dom is not installed, fails to resolve, or resolves to a stub whose version is falsy, this throws at import time — before any bundling begins. It is a hard dependency gate.
Source
Thrown at packages/bundler/src/shared-bundler-config.ts:9
import {createHash} from 'node:crypto';
import path from 'node:path';
import ReactDOM from 'react-dom';
import {NoReactInternals} from 'remotion/no-react';
import {jsonStringifyWithCircularReferences} from './stringify-with-circular-references';
import {getWebpackCacheName} from './webpack-cache';
if (!ReactDOM?.version) {
throw new Error('Could not find "react-dom" package. Did you install it?');
}
const reactDomVersion = ReactDOM.version.split('.')[0];
if (reactDomVersion === '0') {
throw new Error(
`Version ${reactDomVersion} of "react-dom" is not supported by Remotion`,
);
}
export const shouldUseReactDomClient =
NoReactInternals.ENABLE_V5_BREAKING_CHANGES
? true
: parseInt(reactDomVersion, 10) >= 18;
export const getResolveConfig = () => ({
extensions: ['.ts', '.tsx', '.web.js', '.js', '.jsx', '.mjs', '.cjs'],
alias: {
// Only one version of reactView on GitHub (pinned to 78fe4bb3fd)
Solutions
- Install react-dom (and react) at the correct version: bun add react react-dom (or npm/yarn equivalent).
- Confirm the version is supported by Remotion (18.x or 19.x).
- Remove any resolve alias/override that redirects react-dom.
- In a monorepo, ensure react-dom resolves from the workspace that runs the bundler (check hoisting / add as an explicit dep).
Example fix
// before: react-dom not installed -> bundler import throws
// after
// package.json
// "dependencies": { "react": "^19.0.0", "react-dom": "^19.0.0", "@remotion/bundler": "..." }
// then: bun install Defensive patterns
Strategy: validation
Validate before calling
import {createRequire} from 'node:module';
const require = createRequire(import.meta.url);
const assertReactDomInstalled = () => {
let pkg: {version?: string};
try {
pkg = require('react-dom/package.json');
} catch {
throw new Error('react-dom is not installed. Run: bun add react react-dom');
}
if (!pkg.version || pkg.version.startsWith('0.')) {
throw new Error(`Unsupported react-dom version: ${pkg.version}`);
}
};
// run before importing anything from @remotion/bundler Type guard
const hasSupportedReactDom = (): boolean => {
try {
const v = require('react-dom/package.json').version as string | undefined;
return !!v && !v.startsWith('0.');
} catch {
return false;
}
}; Prevention
- Always install react and react-dom alongside Remotion packages.
- In monorepos, declare react-dom as an explicit dependency in the workspace that bundles.
- Avoid resolve aliases that redirect react-dom.
- After a fresh clone, run install before invoking the bundler.
When it happens
Trigger: Importing anything from the bundler package when react-dom is absent from node_modules, hoisted away in a monorepo, or shadowed by an alias/stub that has no version export.
Common situations: Fresh project that installed @remotion/* but forgot react-dom; monorepo hoisting leaving react-dom only in a sibling workspace; an npm/yarn override or resolve alias pointing react-dom at something else; broken partial install.
Related errors
- Version ${reactDomVersion} of "react-dom" is not supported b
- bundle() was called without arguments
- bundle() no longer supports the legacy positional arguments.
- bundle() was called without the `entryPoint` option
- You passed ${entryPoint} as your entry point, but this file
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/e20fb1850eee5c6d.
Report an issue: GitHub.