{"record":{"id":"6cb528d58f7b8d57","repo":"remotion-dev/remotion","slug":"cannot-resolve-dependency-name-because-the-brow","errorCode":null,"errorMessage":"Cannot resolve ${dependency.name} because the Browser Studio Remotion version is unavailable","messagePattern":"Cannot resolve (.+?) because the Browser Studio Remotion version is unavailable","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/browser-studio/src/browser-studio-operations.ts","lineNumber":819,"sourceCode":"\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tconst resolveElementDependencies = async (\n\t\tdependencies: readonly {name: string; version: string | null}[],\n\t) => {\n\t\tconst resolved =\n\t\t\tresolveDependencies !== null\n\t\t\t\t? await resolveDependencies(dependencies)\n\t\t\t\t: {};\n\t\tconst remotionVersion = dependencyVersions.remotion;\n\n\t\tfor (const dependency of dependencies) {\n\t\t\tif (dependency.name.startsWith('@remotion/')) {\n\t\t\t\tif (!remotionVersion) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t`Cannot resolve ${dependency.name} because the Browser Studio Remotion version is unavailable`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tresolved[dependency.name] = remotionVersion;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (dependency.version === null) {\n\t\t\t\tthrow new Error(`Could not resolve ${dependency.name}`);\n\t\t\t}\n\n\t\t\tresolved[dependency.name] ??= dependency.version;\n\t\t}\n\n\t\treturn resolved;\n\t};\n","sourceCodeStart":801,"sourceCodeEnd":837,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/browser-studio/src/browser-studio-operations.ts#L801-L837","documentation":"createBrowserStudioOperations pins every @remotion/* dependency to dependencyVersions.remotion — the build-time injected version record passed in from <BrowserStudio>. If that record lacks a 'remotion' key, resolving any @remotion/* package throws with the package name in the message. Unlike the component-level resolver, this path does not consult remotionPackageSource.","triggerScenarios":"addEffect / pasteEffects / installPackages / element install that pulls in an @remotion/* package while the __BROWSER_STUDIO_DEPENDENCY_VERSIONS__ inject has no 'remotion' entry — typically a custom or mis-built bundle of @remotion/browser-studio.","commonSituations":"Rebuilding @remotion/browser-studio with a modified pipeline that drops the version inject; using a dev/workspace build where dependency versions were never generated; tree-shaking or rewriting that removes the injected global.","solutions":["Use the official published build of @remotion/browser-studio, where dependency versions are injected at build time.","Regenerate the inject with dev/get-dependency-versions-for-build.ts and make sure your bundler defines __BROWSER_STUDIO_DEPENDENCY_VERSIONS__ with a 'remotion' entry.","Audit any custom bundling/aliasing step that could replace the injected global with an empty record."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// The versions come from the build-time inject; verify at startup in dev builds:\ndeclare const __BROWSER_STUDIO_DEPENDENCY_VERSIONS__:\n  | Record<string, string>\n  | undefined;\n\nconst remotionVersionAvailable =\n  typeof __BROWSER_STUDIO_DEPENDENCY_VERSIONS__ !== 'undefined' &&\n  typeof __BROWSER_STUDIO_DEPENDENCY_VERSIONS__.remotion === 'string';\n\nif (!remotionVersionAvailable) {\n  // disable install flows; the bundle is missing the version inject\n}","typeGuard":null,"tryCatchPattern":"try {\n  await operations.effect.addEffect(request);\n} catch (error) {\n  if (\n    error instanceof Error &&\n    error.message.includes('Browser Studio Remotion version is unavailable')\n  ) {\n    // host build defect: rebuild @remotion/browser-studio with the version inject\n  }\n}","preventionTips":["Use official published builds of @remotion/browser-studio.","In custom builds, run the dependency-versions test (test/dependency-versions.test.ts) as a CI gate.","Smoke-test one @remotion/* install in staging before shipping."],"tags":["dependency-resolution","build-config","remotion-version","browser-studio"],"backgroundTag":"missing-dependency-version","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-08-22T21:45:17.748Z","contentChangedAt":"2026-08-22T21:45:17.748Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}