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
- Use a smaller repository - GitHub itself could not enumerate the full tree
- Remove generated/vendored directories from the repo or move them out of git
- 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
- Keep repositories intended for Browser Studio far below GitHub's tree truncation thresholds (~100k entries)
- Do not commit node_modules, generated code, or huge vendored trees
- Prefer dedicated template repos over loading a monorepo wholesale
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
- ${owner}/${repo} has ${fileEntries.length.toLocaleString()}
- ${owner}/${repo} is larger than the 100 MB Browser Studio li
- Invalid GitHub repository URL: ${repoUrl}
- The repo parameter must be an https://github.com URL.
- The GitHub URL must point to a repository, for example https
AI-assisted analysis of remotion-dev/remotion@10db9de073 (2026-08-22).
Data as JSON: /api/errors/6c1926bc495e6a9a.
Report an issue: GitHub.