Repository navigation
fix: raise the Node heap limit for the SDK build - #1473
Merged
Merged
Conversation
The Publish workflow installs with npm and no lockfile, so it resolves the newest zod 4.x. Type-checking the generated models against it peaks above Node's default heap limit, and the last three publish runs failed with an out-of-memory error in tsc. Run tsc with an 8 GB heap in the build and compile scripts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The last three Publish runs (1.5.101, 1.5.102, and the merge of #1372) failed in
npm run buildwithFATAL ERROR: ... JavaScript heap out of memoryintsc, so nothing has reached npm since 1.5.100.Cause: the Publish workflow runs
npm installwithout a lockfile, so it resolves the newestzod4.x (4.6.7).pnpm-lock.yaml, used by PR validation and local builds, pins 4.2.1. Type-checking the generated models against zod 4.6.7 peaks above the default Node heap limit on the runner (about 4 GB). With the lockfile, the build peaks at about 2.4 GB.Change, in both
.speakeasy/gen.yamladditionalScripts(source of truth) andpackage.json:typecheckis unchanged.Verified on a fresh clone of this branch with
npm install --ignore-scripts && npm run build. It resolves zod 4.6.7 the same way Publish does, and the build completes in 37s with a peak RSS of 4.5 GB.This PR doesn't touch
.speakeasy/gen.lock, so merging it doesn't trigger Publish. After merging, run Publish manually (workflow_dispatch) to release the currentmainversion.