-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
docs: demonstrate JavaScript heap setting #10772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…mory Error prevented described here : actions/runner-images#70
|
| - name: build | ||
| env: | ||
| BASE_PATH: '/your-repo-name' | ||
| NODE_OPTIONS: '--max-old-space-size=4096' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we do add this then we'd need to add some description about why. i'd suggest to comment it out in the docs since we don't know that 4096 is optimal for everyone as we don't know the size of their runner, whether they're hitting the issue, etc.
| NODE_OPTIONS: '--max-old-space-size=4096' | |
| # you can increase the memory allocated to the heap if you run out of memory while building | |
| # https://github.com/vitejs/vite/issues/2433 | |
| # NODE_OPTIONS: '--max-old-space-size=4096' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
benmccann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't feel right to me. If we add it to the adapter-static docs then we also need to add it to the adapter-node, adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify docs, etc. If we want to add it, then probably the FAQ would be a better location
|
I'm going to go ahead and close this for the reasons described in the last comment. I think it's relatively easy to find the solution already and adding it just in this one place would create an inconsistency with our other docs |
Error prevented described here : actions/runner-images#70
Note: This "heap out of memory" error happened on BOTH github actions & Netlify,
In BOTH cases the error was solved with this
(In Netlify I had to manually set the environment variable)
It was with a Sveltekit project that was a landing page,
When built, the build folder was only 29 files & 935 kb
So I expect other to experience the error as well.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.