yamadashy/repomix · error · RepomixError
No response body received
Error message
No response body received
What it means
After fetching the GitHub archive response, the code checks response.ok (via checkGitHubResponse) and then requires a non-null response.body to stream the tar.gz. A 2xx response with a null body is treated as fatal because there is nothing to download or extract.
Source
Thrown at src/core/git/gitHubArchive.ts:129
const downloadAndExtractArchive = async (
archiveUrl: string,
targetDirectory: string,
timeout: number,
onProgress?: ProgressCallback,
deps: ArchiveDownloadDeps = defaultDeps,
): Promise<void> => {
const controller = new AbortController();
const timeoutId = setTimeout(controller.abort.bind(controller), timeout);
try {
const response = await deps.fetch(archiveUrl, {
signal: controller.signal,
});
checkGitHubResponse(response);
if (!response.body) {
throw new RepomixError('No response body received');
}
const totalSize = response.headers.get('content-length');
const total = totalSize ? Number.parseInt(totalSize, 10) : null;
let downloaded = 0;
let lastProgressUpdate = 0;
const nodeStream = Readable.fromWeb(response.body as import('node:stream/web').ReadableStream);
// Transform stream for progress tracking
const progressStream = new deps.Transform({
transform(chunk, _encoding, callback) {
downloaded += chunk.length;
// Update progress at most every 100ms to avoid too frequent updates
const now = Date.now();
if (onProgress && now - lastProgressUpdate > 100) {
lastProgressUpdate = now;View on GitHub (pinned to f465ad9093)
Solutions
- Simply retry — the failure is usually transient; downloadGitHubArchive's retry loop will re-attempt.
- Inspect the response through your proxy/AV appliance; disable body-stripping or add an exception for codeload.github.com.
- Check that no AbortSignal/timeout is cancelling the request immediately, and that the runtime's fetch implementation supports streaming bodies (Node >= 18 native fetch).
- Fall back to `git clone` of the repository and run repomix on the local directory.
Defensive patterns
Strategy: retry
Try / catch
try {
await pack({ remote: url });
} catch (e) {
if (e instanceof RepomixError && e.message === 'No response body received') {
// transient/empty 2xx: retry with backoff
await new Promise(r => setTimeout(r, 3000));
} else throw e;
} Prevention
- Disable proxy/AV features that strip or cache-empty response bodies for github.com/codeload.github.com.
- Use Node >= 18 native fetch (full streaming-body support).
- Rely on the library's retry loop instead of wrapping calls in single-shot logic.
When it happens
Trigger: fetch() resolves with an OK status but response.body is null — seen with some runtimes/proxies that return empty-bodied 2xx responses, an abort signal firing mid-setup, or an intermediary cache returning an empty 200.
Common situations: Corporate proxies or security appliances stripping response bodies; unusual fetch polyfills/undici configurations in CI; GitHub returning an empty 200 behind a broken cache layer.
Related errors
- Failed to download GitHub archive after ${retries} attempts.
- Failed to clone repository: ${redactErrorMessage(error)}
- Repository not found or is private. Please check the reposit
- GitHub API rate limit exceeded. ${resetDate ? `Rate limit re
- Access denied. The repository might be private or you might
AI-assisted analysis of yamadashy/repomix@f465ad9093 (2026-08-29).
Data as JSON: /api/errors/dcb9aec768bee149.
Report an issue: GitHub.