-
Notifications
You must be signed in to change notification settings - Fork 100
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
Reached heap limit Allocation on webpack build #183
Conversation
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
+1 Build on CI is broken because of this since v2024.5.0 |
Our CI works just fine: https://github.com/dani-garcia/bw_web_builds/actions/workflows/release.yml Using the docker build also works just fine. If this is within a CI, you can of course also just add that variable to your CI env's i would imagine. |
Environment is not used in the docker build |
My main issue is, that this setting could cause issues on systems which have less memory, where for some reason the build works just fine. Adding this by default might cause issues there. I can think of other ways to solve this though, but that would mean that we would add something like a |
A single line change would be in the Makefile:
We could then set the variable CONTAINER_BUILD_ARGS to "--build-arg NODE_OPTIONS=--max-old-space-size=4096" in CI environment and behavior would stay the same with an empty variable. |
Using a build_env file is more robust I think. |
Sometimes you want to set specific environment variables during build. For example, on some systems nodejs needs some extra options to be able to run correctly on low memory systems. To make sure this will be loaded and works on both scripts and Dockerfile, you can now create a `.build_env` file. This `.build_env` file should contain all the variables (including an export command) you want to expose during build time. The template file has a nodejs example. Closes dani-garcia#183 Signed-off-by: BlackDex <[email protected]>
Sometimes you want to set specific environment variables during build. For example, on some systems nodejs needs some extra options to be able to run correctly on low memory systems. To make sure this will be loaded and works on both scripts and Dockerfile, you can now create a `.build_env` file. This `.build_env` file should contain all the variables (including an export command) you want to expose during build time. The template file has a nodejs example. Closes dani-garcia#183 Signed-off-by: BlackDex <[email protected]>
@alebo-iX & @maurice-audin I have created a PR which should solve this issue in a more flexible way, instead of forcing the memory option on all builds, or add complex and error prone variables which might be empty or not, or contain globs etc... See #184 |
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory