policy size_limit_error ai_generated true

Error: Package size exceeds the limit of 200MB

ID: policy/npm-package-size

Also available as: JSON · Markdown
82%Fix Rate
84%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
any active

Root Cause

npm package exceeds maximum publishable size of ~200MB.

generic

Workarounds

  1. 90% success Use .npmignore to exclude test fixtures, docs, and build artifacts
    .npmignore: test/ docs/ *.map coverage/
  2. 85% success Move large assets to CDN and reference by URL in package
    Host binaries on GitHub Releases or S3

Dead Ends

Common approaches that don't work:

  1. Split into multiple packages over 200MB each 90% fail

    Each package has the same limit.

  2. Compress assets within the package 70% fail

    npm publishes the tarball; internal compression does not help.