remotion-dev/remotion · error · Error
${owner}/${repo} has ${fileEntries.length.toLocaleString()}
Error message
${owner}/${repo} has ${fileEntries.length.toLocaleString()} files. Browser Studio supports up to ${maximumRepositoryFiles.toLocaleString()}. What it means
After filtering the GitHub tree to blobs, loadGitHubRepository enforces maximumRepositoryFiles = 2_000. A repository with more tracked files than that is rejected with the exact count and the limit in the message. The check runs after per-path validation but before any bytes are downloaded.
Source
Thrown at packages/browser-studio/src/load-github-repository.ts:176
}
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(
(total, entry) => total + (entry.size ?? 0),
0,
);
if (totalBytes > maximumRepositoryBytes) {
throw new Error(
`${owner}/${repo} is larger than the 100 MB Browser Studio limit.`,
);
}
let loadedBytes = 0;
let loadedFiles = 0;
const files: Record<string, string> = {};
const publicFiles: Record<string, VirtualProjectPublicFile> = {};View on GitHub (pinned to 10db9de073)
Solutions
- Reduce the repository to 2,000 tracked files or fewer (remove build output, vendored deps, unused assets)
- Point Browser Studio at a slim template repo instead of a large monorepo
- Check the count beforehand with: git ls-files | wc -l
Defensive patterns
Strategy: try-catch
Try / catch
try {
await loadGitHubRepository({repoUrl, onProgress});
} catch (e) {
const msg = String((e as Error).message);
if (/supports up to/.test(msg)) {
// the message contains the actual count; guide the user to prune below 2,000 files
} else throw e;
} Prevention
- Check file count with git ls-files | wc -l before sharing a repo link
- Add .gitignore entries for build output and vendored dependencies
- Curate a minimal demo/template repo for Browser Studio instead of a full project
When it happens
Trigger: Calling loadGitHubRepository on a repository whose tree contains more than 2,000 blob entries - e.g. committed node_modules, build artifacts, or an asset-heavy project; fileEntries.length > maximumRepositoryFiles triggers the throw.
Common situations: Monorepos; repos with generated output checked in; design-heavy projects with thousands of images; users expecting a full app repository to load into a browser sandbox.
Related errors
- ${owner}/${repo} has too many files for Browser Studio to lo
- ${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/4c0db5fb0ec3d933.
Report an issue: GitHub.