Troubleshooting
File Size Limits
A file exceeds the 5 MB per-file or 50 MB total payload limit.
Symptom
A file save or deployment fails with an error indicating that a file exceeds the size limit or the total deployment payload exceeds the allowed maximum. The error may appear as a toast notification, an API error (413 or 400), or a validation failure in the deploy panel.
Likely Causes
- Single file exceeds 5 MB: A file's content is larger than the 5 MB per-file limit. Common causes: pasted minified library code, large SVG data, or auto-generated code.
- Total payload exceeds 50 MB: The combined size of all files in the project exceeds 50 MB. This is checked at deploy time, not on individual saves.
- Binary or encoded content: Base64-encoded images or fonts embedded directly in a CSS or JS file can inflate file size rapidly.
- Accidental paste of large content: A clipboard paste operation added a large block of text (e.g., a full library source) that pushed the file over the limit.
Checks
- Identify the file named in the error message.
- Check the file size. The status bar shows file information. Alternatively, check the file tree (some views show size metadata).
- If the error is about total payload, review all files in the project. Look for unusually large files.
- Check whether the file contains embedded data (Base64 images, inline fonts, or copied library source code).
Fixes
Reduce single file size
- Move library code to external dependencies: Instead of pasting a library's source into a project file, add it via the Dependencies panel. Libraries like GSAP, Swiper, and Lenis are available as curated presets.
- Remove inline assets: Move Base64-encoded images or fonts to an external hosting service and reference them by URL.
- Split large files: Break a large file into smaller modules. Use
importstatements to compose them.
Reduce total payload
- Audit files: Review all project files and remove unused or experimental files.
- Remove duplicates: Check for duplicate files or files that serve the same purpose.
- Externalize large assets: Move any file that is not JS, TS, CSS, or SCSS to an external hosting service.
File constraints reference
| Constraint | Limit |
|---|---|
| Maximum file size | 5 MB per file |
| Maximum total payload | 50 MB per deployment |
| Maximum file path length | 500 characters |
| Files per project (Free) | 5 |
| Files per project (Beta) | 50 |
| Files per project (Individual, Team) | 200 |
See Plans and Limits for the full constraints table.
What to Capture for Escalation
- The exact error message (including any file name and size values).
- The name and approximate size of the file that triggered the error.
- The total number of files in the project.
- Whether the error occurs on save, on deploy, or both.
- Your plan (Free, Beta, Individual, or Team).