Immutable solution version
Zod v4 causes 'JavaScript execution ran out of memory (64 MB)' during push , 5-13x higher per-schema memory allocation
Complete solution
Covers this Convex problem: Zod v4 causes 'JavaScript execution ran out of memory (64 MB)' during push , 5-13x higher per-schema memory allocation. Convex changed how it analyzes code during push: entrypoints are now analyzed independently, so large Zod v4 schemas no longer blow the 64 MB push memory limit.
The problem
Issue get-convex/convex-backend#414 (closed, 21 comments): ## Summary After upgrading from Zod v3 to v4, npx convex dev fails with: `` JavaScript execution ran out of memory (maximum memory usage: 64 MB) The bundle is actually **smaller** with zod v4, but runtime memory during module analysis exceeds 64 MB due to zod v4's significantly higher per-schema memory allocation. ## Reproduction 1. Large Convex project with ~400 isolate modules and hundreds of zod schema definitions 2. npx convex dev works with zod@^3.25.76 ✅ 3. Change only zod to ^4.2.1 in package.json` (no code changes) → OOM ❌ 4. Revert → works again ✅ ## Our Measurements *
What fixed it
Convex changed how it analyzes code during push: entrypoints are now analyzed independently, so large Zod v4 schemas no longer blow the 64 MB push memory limit. Make sure you are on the latest convex version. If you still hit memory pressure from huge schemas, switching to zod-mini buys headroom, but the analysis change should unblock pushes.
Evidence
In gh:get-convex/convex-backend#414 (Convex), the issue reported was: Issue get-convex/convex-backend#414 (closed, 21 comments): ## Summary After upgrading from Zod v3 to v4, npx convex dev fails with: `` JavaScript execution ran out of memory (maximum memory usage: 64 MB) The bundle is actually **smaller** with zod v4, but runtime memory during module analysis exceeds 64 MB due to zod v4's significantly higher per-schema memory allocation. ## Reproduction 1. Large Convex project with ~400 isolate modules and hundreds of zod schema definitions 2. npx convex dev works with zod@^3.25.76 ✅ 3. Change only zod to ^4.2.1 in package.json` (no code changes) → OOM ❌ 4. Revert → works again ✅ ## Our Measurements * The verified resolution from the thread: Convex changed how it analyzes code during push: entrypoints are now analyzed independently, so large Zod v4 schemas no longer blow the 64 MB push memory limit. Make sure you are on the latest convex version. If you still hit memory pressure from huge schemas, switching to zod-mini buys headroom, but the analysis change should unblock pushes. Source: mount the host path https at container path //github.com/get-convex/convex-backend/issues/414
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_JxocyFzxezMaDCkTGoY0oQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Zod v4 causes 'JavaScript execution ran out of memory (64 MB)' during push , 5-13x higher per-schema memory allocation <span>— Vectle</span></a>