{"record":{"id":"6224668c4ea6344b","repo":"remotion-dev/remotion","slug":"multiple-versions-of-remotion-detected-vers","errorCode":null,"errorMessage":"🚨 Multiple versions of Remotion detected: ${[VERSION, alreadyImported].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.","messagePattern":"🚨 Multiple versions of Remotion detected: (.+?)\\. 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\\.","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"critical","filePath":"packages/core/src/multiple-versions-warning.ts","lineNumber":38,"sourceCode":"\tif (alreadyImported) {\n\t\tif (alreadyImported === VERSION) {\n\t\t\t// Next.JS will reload the package and cause a server-side warning.\n\t\t\t// It's okay if this happens during SSR in developement\n\t\t\treturn;\n\t\t}\n\n\t\t// @remotion/webcodecs will also set this variable for the purpose of\n\t\t// being picked up by Wappalyzer.\n\t\t// If so, we can just override it because it is not the same as Remotion\n\t\tif (\n\t\t\ttypeof alreadyImported === 'string' &&\n\t\t\talreadyImported.includes('webcodecs')\n\t\t) {\n\t\t\tset();\n\t\t\treturn;\n\t\t}\n\n\t\tthrow new TypeError(\n\t\t\t`🚨 Multiple versions of Remotion detected: ${[\n\t\t\t\tVERSION,\n\t\t\t\ttypeof alreadyImported === 'string'\n\t\t\t\t\t? alreadyImported\n\t\t\t\t\t: 'an older version',\n\t\t\t]\n\t\t\t\t.filter(truthy)\n\t\t\t\t.join(\n\t\t\t\t\t' and ',\n\t\t\t\t)}. 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.`,\n\t\t);\n\t}\n\n\tset();\n};\n","sourceCodeStart":20,"sourceCodeEnd":54,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/multiple-versions-warning.ts#L20-L54","documentation":"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;`.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before (package.json)\n\"@remotion/core\": \"4.0.50\",\n\"@remotion/lottie\": \"4.0.40\"\n// after\n\"@remotion/core\": \"4.0.50\",\n\"@remotion/lottie\": \"4.0.50\"","handlingStrategy":"validation","validationCode":"import {VERSION} from '@remotion/core';\n// at build/startup, assert all packages share VERSION\nconst pkgs = ['@remotion/core','@remotion/renderer','@remotion/bundler'];\nfor (const p of pkgs) {\n  const v = require(`${p}/package.json`).version;\n  if (v !== VERSION) throw new Error(`${p} ${v} != ${VERSION}`);\n}","typeGuard":null,"tryCatchPattern":"// CI check script\nconst { execSync } = require('child_process');\nconst out = execSync('bunx remotion versions').toString();\nif (/mismatch/i.test(out)) process.exit(1);","preventionTips":["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."],"tags":["versioning","dependency-management","startup","monorepo"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}