paperclipai/paperclip · error · Error

Package is too large to zip in memory (zip64 archives are…

Error message

Package is too large to zip in memory (zip64 archives are not supported).

What it means

createStoredZipArchive accumulates the archive in one buffer and does not support zip64; the total uncompressed size exceeded the 32-bit zip limits, so the package cannot be zipped in memory.

Solutions

  1. Reduce the package size; zip64 archives are not supported for in-memory zipping.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cli/src/commands/client/zip.ts:94 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/264cac09059af242. Report an issue: GitHub.

Appendix: source

Thrown at cli/src/commands/client/zip.ts:94

    const centralHeader = new Uint8Array(46 + fileName.length);
    writeUint32(centralHeader, 0, 0x02014b50);
    writeUint16(centralHeader, 4, 20);
    writeUint16(centralHeader, 6, 20);
    writeUint16(centralHeader, 8, 0x0800);
    writeUint16(centralHeader, 10, 0);
    writeUint32(centralHeader, 16, checksum);
    writeUint32(centralHeader, 20, body.length);
    writeUint32(centralHeader, 24, body.length);
    writeUint16(centralHeader, 28, fileName.length);
    writeUint32(centralHeader, 42, localOffset);
    centralHeader.set(fileName, 46);

    localChunks.push(localHeader, body);
    centralChunks.push(centralHeader);
    localOffset += localHeader.length + body.length;
    if (body.length > ZIP_MAX_OFFSET_BYTES || localOffset > ZIP_MAX_OFFSET_BYTES) {
      throw new Error("Package is too large to zip in memory (zip64 archives are not supported).");
    }
  }

  const centralDirectoryLength = centralChunks.reduce((sum, chunk) => sum + chunk.length, 0);
  const archive = new Uint8Array(localOffset + centralDirectoryLength + 22);
  let offset = 0;
  for (const chunk of localChunks) {
    archive.set(chunk, offset);
    offset += chunk.length;
  }
  const centralDirectoryOffset = offset;
  for (const chunk of centralChunks) {
    archive.set(chunk, offset);
    offset += chunk.length;
  }
  writeUint32(archive, offset, 0x06054b50);
  writeUint16(archive, offset + 8, entries.length);
  writeUint16(archive, offset + 10, entries.length);

View on GitHub (pinned to 120ae5428f)