Skip to content

Conversation

@MarArMar
Copy link

@MarArMar MarArMar commented Sep 23, 2023

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:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

@changeset-bot
Copy link

changeset-bot bot commented Sep 23, 2023

⚠️ No Changeset found

Latest commit: a00e8d7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@benmccann benmccann changed the title [Fix] Update 50-adapter-static.md : Prevent JavaScript heap out of me… docs: demonstrate JavaScript heap setting Sep 23, 2023
@benmccann benmccann added documentation Improvements or additions to documentation pkg:adapter-static labels Sep 23, 2023
- name: build
env:
BASE_PATH: '/your-repo-name'
NODE_OPTIONS: '--max-old-space-size=4096'
Copy link
Member

@benmccann benmccann Sep 23, 2023

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.

Suggested change
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'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

Copy link
Member

@benmccann benmccann left a 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

@benmccann
Copy link
Member

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

@benmccann benmccann closed this Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pkg:adapter-static

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants