{"record":{"id":"665b4771a2fd00ed","repo":"remotion-dev/remotion","slug":"browser-studio-remotion-version-is-unavailable","errorCode":null,"errorMessage":"Browser Studio Remotion version is unavailable","messagePattern":"Browser Studio Remotion version is unavailable","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/browser-studio/src/BrowserStudio.tsx","lineNumber":276,"sourceCode":"\tconst updateProject = useCallback(\n\t\t(nextProject: BrowserStudioProps['project']) => {\n\t\t\tactiveProjectRef.current = nextProject;\n\t\t\tsetEditedProject({\n\t\t\t\tproject: nextProject,\n\t\t\t\tsourceProject: incomingProjectRef.current,\n\t\t\t});\n\t\t\tonProjectChangeRef.current?.(nextProject);\n\t\t},\n\t\t[],\n\t);\n\tconst resolveElementDependencies = useCallback(\n\t\t(dependencies: readonly {name: string; version: string | null}[]) => {\n\t\t\tconst remotionVersion =\n\t\t\t\tremotionPackageSource?.type === 'release'\n\t\t\t\t\t? remotionPackageSource.version\n\t\t\t\t\t: browserStudioDependencyVersions.remotion;\n\t\t\tif (!remotionVersion) {\n\t\t\t\tthrow new Error('Browser Studio Remotion version is unavailable');\n\t\t\t}\n\n\t\t\tconst versions: Record<string, string> = {};\n\t\t\tconst resolutions: Record<string, BrowserStudioDependencyResolution> = {};\n\t\t\tfor (const dependency of dependencies) {\n\t\t\t\tconst requestedVersion = dependency.name.startsWith('@remotion/')\n\t\t\t\t\t? remotionVersion\n\t\t\t\t\t: dependency.version;\n\t\t\t\tconst customResolution = dependencyResolverRef.current?.({\n\t\t\t\t\tname: dependency.name,\n\t\t\t\t\tversion: requestedVersion,\n\t\t\t\t});\n\t\t\t\tconst customVersion =\n\t\t\t\t\ttypeof customResolution === 'string' &&\n\t\t\t\t\t!customResolution.startsWith('http')\n\t\t\t\t\t\t? customResolution\n\t\t\t\t\t\t: typeof customResolution === 'object'\n\t\t\t\t\t\t\t? (customResolution?.version ?? null)","sourceCodeStart":258,"sourceCodeEnd":294,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/browser-studio/src/BrowserStudio.tsx#L258-L294","documentation":"Thrown by the dependency resolver inside the <BrowserStudio> React component. Every @remotion/* package installed into the virtual project must be pinned to one Remotion version, taken from remotionPackageSource.version when remotionPackageSource.type === 'release', otherwise from the build-time injected browserStudioDependencyVersions.remotion record (__BROWSER_STUDIO_DEPENDENCY_VERSIONS__). If neither source yields a version, dependency resolution cannot proceed and this error is thrown.","triggerScenarios":"Any operation that resolves dependencies (installPackages, addEffect whose import path maps to an @remotion/* package, element install flows) while remotionPackageSource is undefined or {type: 'workspace'} AND the injected dependency-version record has no 'remotion' entry.","commonSituations":"Self-hosting @remotion/browser-studio from source with a custom bundler that skips the __BROWSER_STUDIO_DEPENDENCY_VERSIONS__ define/inject step; using a workspace (dev) remotionPackageSource in an embed built without the version inject; stale custom build config after upgrading the package.","solutions":["Pass remotionPackageSource={{type: 'release', baseUrl, version}} to <BrowserStudio> with a concrete published version.","If building from source, inject __BROWSER_STUDIO_DEPENDENCY_VERSIONS__ (see dev/get-dependency-versions-for-build.ts) with a 'remotion' entry via your bundler's define/globals.","Consume the published artifact instead of raw source so the build-time version inject is present."],"exampleFix":"// before\n<BrowserStudio project={project} readOnly={false} />\n\n// after\n<BrowserStudio\n  project={project}\n  readOnly={false}\n  remotionPackageSource={{\n    type: 'release',\n    baseUrl: 'https://esm.sh',\n    version: '4.0.0',\n  }}\n/>","handlingStrategy":"validation","validationCode":"import type {BrowserStudioRemotionPackageSource} from '@remotion/browser-studio';\n\nconst isReleaseSource = (\n  source: BrowserStudioRemotionPackageSource | undefined,\n): source is {type: 'release'; baseUrl: string; version: string} =>\n  source?.type === 'release' && source.version.length > 0;\n\n// Before enabling any package-install / element-install flow:\nif (!isReleaseSource(remotionPackageSource)) {\n  // versions then depend on the build-time inject; verify it exists in your build\n  // before allowing installs, otherwise surface a config error to the user.\n}","typeGuard":"const isReleaseSource = (\n  source: BrowserStudioRemotionPackageSource | undefined,\n): source is {type: 'release'; baseUrl: string; version: string} =>\n  source?.type === 'release' && source.version.length > 0;","tryCatchPattern":"try {\n  await operations.packageInstallation.installPackages({dependencies});\n} catch (error) {\n  if (error instanceof Error && error.message.includes('Remotion version is unavailable')) {\n    // surface a host configuration error: fix remotionPackageSource or the build inject\n  }\n  throw error;\n}","preventionTips":["Always pass remotionPackageSource={{type: 'release', ...}} when self-hosting.","Add a build-time assertion that __BROWSER_STUDIO_DEPENDENCY_VERSIONS__ contains a 'remotion' key.","Disable install UI until a Remotion version source is confirmed available."],"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"}