-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
JavaScript heap out of memory: --max_old_space_size not working with nx #1110
Comments
This is how I do it and it works perfect: Make a special note on the dashes - in |
I think this could be an issue with how the affected actions are spawned. This may change in the soon, but not immediate future. Passing |
There is always the possibility to set the |
I am also having memory issues lately. To be a bit more specific:
My solution was to tweak the Hopefully cypress will allow |
@FrozenPandaz in fact that's what I assumed, didn't have the time to dig in today afternoon though.
@bridzius yep, I just wanted to try that to see whether it helps 😄, thx 👍 |
We can not run cypress tests with the affected command. As @skydever explained, setting env variable during command stops cypress due the bug an providing node --max_old_space_size=4096 is also not working. Any other workarounds? |
@FrozenPandaz I think what we should do is spawn an npm script instead of ng directly, so folks can override |
@juristr would you like to work with me on fixing this? I can help you get your dev env up and running. |
This is also a problem for me in my CI environment. My CircleCI account has a 4gb memory limit, and my builds always fail. e2e fails only sometimes. I'm using the latest nx monorepo versions and cypress. |
Passing by after fixing a similar issue: that could help someone, adding |
Hey @vsavkin sorry, totally missed ur message and just saw it now. Sure, I might find some time to work on this next week. Meanwhile I'm gonna see whether I'm still reproducing the issue as I worked around it atm via the
That'd be great if you have some suggestions 👍 |
Currently, we can invoke commands (say When we invoke things serially, we directly invoke "ng". And we use spawnChild to do that. The options I see are like this:
I personally prefer the first one as it gives the developer the ability to customize what they want to customize in the same fashion for serial and parallel execution |
Folks, as a temporary workaround you can do the following. In your package.json, update the ng script to set the max heap size:
And then run:
|
On Windows it only works with:
|
still get javascript heap of of memory when running |
@vsavkin Agree, gonna give it a look 👍 |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Prerequisites
Expected Behavior
Since recently I'm experiencing node memory issues during AOT compilation. As described here on the angular-cli repo, setting the
--max_old_space_size
helps if I build the project likeHowever, if I apply the same to the
affected:build
script it doesn't seem to be interpreted. Possible?I have..
and then I invoke it with
Failure Information (for bugs)
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Steps to Reproduce
Happens on my monorepo, which I unfortunately cannot upload somewhere.
Context
Please provide any relevant information about your setup:
Other
I think the important thing is to understand whether node params in this case are passed along or whether NX forks node and doesn't pass them along.
The text was updated successfully, but these errors were encountered: