remotion-dev/remotion · error · Error

${owner}/${repo} has too many files for Browser Studio to lo

Error message

${owner}/${repo} has too many files for Browser Studio to load.

What it means

GitHub's recursive trees API truncates listings that would exceed its internal limits (100,000 entries / roughly 7MB of payload) and sets truncated: true. Browser Studio refuses to load a partial file listing, so any repository whose tree comes back truncated is rejected outright with this message before any file is downloaded.

Source

Thrown at packages/browser-studio/src/load-github-repository.ts:163

		{signal},
	);
	if (!treeResponse.ok) {
		throw new Error(
			`Could not read ${owner}/${repo}: ${await getResponseError(treeResponse)}`,
		);
	}

	const tree = (await treeResponse.json()) as GitHubTreeResponse;
	if (!tree.tree || !tree.sha) {
		throw new Error(
			`Could not read ${owner}/${repo}: ${tree.message ?? 'GitHub returned an invalid file tree.'}`,
		);
	}

	const treeSha = tree.sha;

	if (tree.truncated) {
		throw new Error(
			`${owner}/${repo} has too many files for Browser Studio to load.`,
		);
	}

	const fileEntries = tree.tree.filter(
		(entry): entry is GitHubTreeEntry & {type: 'blob'} => entry.type === 'blob',
	);
	for (const file of fileEntries) {
		validateRepositoryPath(file.path);
	}

	if (fileEntries.length > maximumRepositoryFiles) {
		throw new Error(
			`${owner}/${repo} has ${fileEntries.length.toLocaleString()} files. Browser Studio supports up to ${maximumRepositoryFiles.toLocaleString()}.`,
		);
	}

	const totalBytes = fileEntries.reduce(

View on GitHub (pinned to 10db9de073)

Solutions

  1. Use a smaller repository - GitHub itself could not enumerate the full tree
  2. Remove generated/vendored directories from the repo or move them out of git
  3. Point Browser Studio at a lean branch or a dedicated template repo instead
Defensive patterns

Strategy: try-catch

Try / catch

try {
  await loadGitHubRepository({repoUrl, onProgress});
} catch (e) {
  if (/too many files/.test(String((e as Error).message))) {
    // explain GitHub truncated the tree itself; suggest a leaner repo/branch and stop
  } else throw e;
}

Prevention

When it happens

Trigger: Calling loadGitHubRepository on a repository with an extremely large file tree (typically monorepos or repos with huge vendored directories) where the GitHub API response for git/trees/HEAD?recursive=1 is truncated.

Common situations: Monorepos containing many packages; repos with committed node_modules, generated code, or massive asset trees; data repositories with hundreds of thousands of files.

Related errors


AI-assisted analysis of remotion-dev/remotion@10db9de073 (2026-08-22). Data as JSON: /api/errors/6c1926bc495e6a9a. Report an issue: GitHub.