remotion-dev/remotion Β· critical Β· TypeError
π¨ Multiple versions of Remotion detected: ${[VERSION, alrea
Error message
π¨ Multiple versions of Remotion detected: ${[VERSION, alreadyImported].filter(truthy).join(' and ')}. This will cause things to break in an unexpected way.
Check that all your Remotion packages are on the same version. If your dependencies depend on Remotion, make them peer dependencies. You can also run `npx remotion versions` from your terminal to see which versions are mismatching. What it means
Remotion sets a global flag the first time any @remotion/* package imports, recording its VERSION. On a subsequent import with a different version it throws, because mismatched internal contracts between renderer/core/bundler cause subtle, hard-to-diagnose breakage. An exception is made when the existing flag string contains 'webcodecs' (set by @remotion/webcodecs for Wappalyzer detection) β that case is silently overridden by `set(); return;`.
Source
Thrown at packages/core/src/multiple-versions-warning.ts:38
if (alreadyImported) {
if (alreadyImported === VERSION) {
// Next.JS will reload the package and cause a server-side warning.
// It's okay if this happens during SSR in developement
return;
}
// @remotion/webcodecs will also set this variable for the purpose of
// being picked up by Wappalyzer.
// If so, we can just override it because it is not the same as Remotion
if (
typeof alreadyImported === 'string' &&
alreadyImported.includes('webcodecs')
) {
set();
return;
}
throw new TypeError(
`π¨ Multiple versions of Remotion detected: ${[
VERSION,
typeof alreadyImported === 'string'
? alreadyImported
: 'an older version',
]
.filter(truthy)
.join(
' and ',
)}. This will cause things to break in an unexpected way.\nCheck that all your Remotion packages are on the same version. If your dependencies depend on Remotion, make them peer dependencies. You can also run \`npx remotion versions\` from your terminal to see which versions are mismatching.`,
);
}
set();
};
View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Run `npx remotion versions` (or `bunx remotion versions`) to see which packages mismatch.
- Align every @remotion/* package to the same version in package.json and reinstall (bun install).
- In libraries you control, declare remotion packages as peerDependencies, not dependencies.
- Clear node_modules and the lockfile, then reinstall: rm -rf node_modules && bun install.
Example fix
// before (package.json) "@remotion/core": "4.0.50", "@remotion/lottie": "4.0.40" // after "@remotion/core": "4.0.50", "@remotion/lottie": "4.0.50"
Defensive patterns
Strategy: validation
Validate before calling
import {VERSION} from '@remotion/core';
// at build/startup, assert all packages share VERSION
const pkgs = ['@remotion/core','@remotion/renderer','@remotion/bundler'];
for (const p of pkgs) {
const v = require(`${p}/package.json`).version;
if (v !== VERSION) throw new Error(`${p} ${v} != ${VERSION}`);
} Try / catch
// CI check script
const { execSync } = require('child_process');
const out = execSync('bunx remotion versions').toString();
if (/mismatch/i.test(out)) process.exit(1); Prevention
- Run `bunx remotion versions` in CI to catch mismatches.
- Pin all @remotion/* packages with a single shared version range.
- In libraries, declare remotion as peerDependencies only.
- Use a lockfile and dedupe to prevent duplicate installs.
When it happens
Trigger: Two or more @remotion/* packages resolved at different versions in node_modules; a transitive dependency that bundles its own copy of remotion instead of peer-depending on it; yarn/npm/pnpm hoisting mismatch.
Common situations: Upgrading only some @remotion/* packages while leaving others pinned; a third-party Remotion library listing remotion as a regular dependency; monorepo with duplicate installs across workspaces.
Related errors
- The repository package ${packageName} does not expose ${subp
- You must pass a React component to registerRoot(), but ${JSO
- registerRoot() was called more than once.
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/6224668c4ea6344b.
Report an issue: GitHub.