-
Notifications
You must be signed in to change notification settings - Fork 266
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
[xo-web:build] Error: JavaScript heap out of memory #5092
Comments
I cannot reproduce with Node 12.18.0 on my machine. Anyway, I don't want to touch xo-web build system, it will be completely revamped for XO6, but if there are issues, I'm open to work-around 🙂 |
I have just updated to Node 12.18.0. The build error is still there. |
You just have not enough RAM during the build. |
Sure, I know. I just wanted to point out that the build could be fail even if you comply with the minimum resource requirements for the XO VM and with the suggested software environment. @julien-f, I understand that you don't want to touch xo-web build system. The workaround could also work by exporting the env variable in the session ( |
If this issue impacts other people, we'll add this flag to the |
Sorry but I can't find in the documentation where we are talking about this 2GiB RAM as suggested environment to XO built on the sources? |
@olivierlambert, you're right there is no explicit notes about the suggested environment for XO built from the sources. Indeed, I never mentioned it, while I always referred to XOA VM specificatons (as in the issue details). Also, probably I'm the only one with such limited resources on my test lab. 😞 |
No problem. XOA VM is made to run XO, it's not a dev environment 😉 However, our doc should probably add a warning on source/build section about this potential issue. We'll do that! |
We ran into this same issue a few months ago. Discussion is here -- Wasn't aware of |
Closing because will be completely fixed with XO6. |
Context
Expected behavior
Building XO from sources ends successfully.
Current behavior
The build fails with the following error:
The issue occurs when you are using nodejs v12.x and the XO-VM has 2GB RAM (as per XOA VM specifications)
The issues doesn't happen if you have these environments:
Workaround
The issue can be mitigated by adding the environment variable specification
NODE_OPTIONS='--max_old_space_size=2048'
at line :151 inpackages/xo-web/package.json
(take a look at the patchfile xo-web_build_heap_limit.patch.zip). The resulting line becomes:For context, Node 12 has a different heap management strategy which is based on available memory instead of using defaults. More details here, here and here
The text was updated successfully, but these errors were encountered: