build: give the type-check a 4 GB heap (fixes the Amplify deploy) - #339
Merged
Conversation
Amplify's build image runs Node 22 with a ~2 GB default old-space limit. next build compiles, then the TypeScript step runs out of memory at that limit: the project's type-check now peaks at about 2.25 GB. Setting the heap in the build script keeps the fix in the repo rather than in the hosting console. Claude-Session: https://claude.ai/code/session_01TxkiFYtGhZVcNWyxHHEdH6
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.
Amplify's main deploy for 39c629e fails in the build phase after a successful compile:
The build image runs Node 22 with a ~2 GB default old-space limit, and the project's TypeScript check now needs about 2.25 GB. Reproduced locally:
node --max-old-space-size=2048 tsc --noEmitdies the same way; at 4096 it passes with a 2.25 GB peak RSS.This sets
NODE_OPTIONS=--max-old-space-size=4096on thebuildscript so the fix is versioned. Amplify's standard build instance has enough memory for it.yarn buildverified green locally with the change.https://claude.ai/code/session_01TxkiFYtGhZVcNWyxHHEdH6