{"record":{"id":"6c1926bc495e6a9a","repo":"remotion-dev/remotion","slug":"owner-repo-has-too-many-files-for-browser-st","errorCode":null,"errorMessage":"${owner}/${repo} has too many files for Browser Studio to load.","messagePattern":"(.+?)/(.+?) has too many files for Browser Studio to load\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/browser-studio/src/load-github-repository.ts","lineNumber":163,"sourceCode":"\t\t{signal},\n\t);\n\tif (!treeResponse.ok) {\n\t\tthrow new Error(\n\t\t\t`Could not read ${owner}/${repo}: ${await getResponseError(treeResponse)}`,\n\t\t);\n\t}\n\n\tconst tree = (await treeResponse.json()) as GitHubTreeResponse;\n\tif (!tree.tree || !tree.sha) {\n\t\tthrow new Error(\n\t\t\t`Could not read ${owner}/${repo}: ${tree.message ?? 'GitHub returned an invalid file tree.'}`,\n\t\t);\n\t}\n\n\tconst treeSha = tree.sha;\n\n\tif (tree.truncated) {\n\t\tthrow new Error(\n\t\t\t`${owner}/${repo} has too many files for Browser Studio to load.`,\n\t\t);\n\t}\n\n\tconst fileEntries = tree.tree.filter(\n\t\t(entry): entry is GitHubTreeEntry & {type: 'blob'} => entry.type === 'blob',\n\t);\n\tfor (const file of fileEntries) {\n\t\tvalidateRepositoryPath(file.path);\n\t}\n\n\tif (fileEntries.length > maximumRepositoryFiles) {\n\t\tthrow new Error(\n\t\t\t`${owner}/${repo} has ${fileEntries.length.toLocaleString()} files. Browser Studio supports up to ${maximumRepositoryFiles.toLocaleString()}.`,\n\t\t);\n\t}\n\n\tconst totalBytes = fileEntries.reduce(","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/remotion-dev/remotion/blob/10db9de07356446fb0edb3c3ae211369b693d18b/packages/browser-studio/src/load-github-repository.ts#L145-L181","documentation":"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.","triggerScenarios":"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.","commonSituations":"Monorepos containing many packages; repos with committed node_modules, generated code, or massive asset trees; data repositories with hundreds of thousands of files.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await loadGitHubRepository({repoUrl, onProgress});\n} catch (e) {\n  if (/too many files/.test(String((e as Error).message))) {\n    // explain GitHub truncated the tree itself; suggest a leaner repo/branch and stop\n  } else throw e;\n}","preventionTips":["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"],"tags":["browser-studio","github","repository-size","truncated"],"backgroundTag":"repository-size-limit-exceeded","analyzedSha":"10db9de07356446fb0edb3c3ae211369b693d18b","analyzedAt":"2026-08-22T21:45:17.748Z","contentChangedAt":"2026-08-22T21:45:17.748Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}