mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
ca920066ac
The @copilotkit/core build (tsdown with dts generation) has a working set of about 3.45GB. Node's default old-space ceiling is roughly 4GB and CI pins NODE_OPTIONS to 4096, leaving almost no headroom. Under nx run-many the build competes for CPU with sibling builds, GC falls behind, and the process tips over the heap limit. nx flags it as a flaky task and pre-commit/CI builds fail intermittently with a V8 heap OOM. Bake the ceiling into the core build script with cross-env so every invocation path gets consistent headroom: local lefthook hooks, nx run-many, CI, and direct pnpm build, on every platform including Windows. 8192 matches the value already used by the e2e workflow and gives roughly 2x headroom over the working set. Scoped to core only; it is the single package that OOMs.