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
react-native JavaScript heap out of memory when import "aws-sdk/dist/aws-sdk-react-native" #2370
Comments
Here is the stack-trace:
|
Hi aws-sdk team, it is me again. I am here to give more information about the issue. When I install the newest version of aws-sdk, this issue appear. Version of new aws-sdk: "2.361.0". I hope this can help both of us to figure it out the issue and how to solve it. Thank you in advance! |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
thanks @srchase for re-open this issue, do you have any suggestion for me? Currently, aws-sdk: "2.356.0" is failed to build release on Android too. |
Hi @srchase , I am able to run debug by changing the
In terminal run: "npm run start-max" to start the node server with 8,192 MB. Enjoy! |
hey @truongluong1314520 did you manage to solve this?
|
Applying the ignore opens up another error for me with the latest sdk undefined is not an object (evaluating 'global.TYPED_ARRAY_SUPPORT') |
@jstewmon using |
@Gregjarvez did you mean to mention me? |
@ricbermo I added the same thing to babelrc too, but it is not working for me. I am using react native version 0.57.8 |
I am able to run my simulator only if I run that "start-max" script beforehand, but when I try to upload my app to the app store, I keep getting the out of memory error. --max-old-space-size=8192 does not fix it in this situation. It seems like when I archive my project from xcode, it does not use the node server I created with "start-max". I also tried adding the babel "ignore" command on both my app's package.json and the aws-sdk package.json but that does not help either. Did anyone of you figure it out? |
I get a "FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory" instead of "FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory" if that changes anything. Here is my stack-trace:
|
@Blutude I'm using this version:
with this: |
@truongluong1314520 sorry for the late reply. can u try that ^^ as well? |
@ricbermo With this change, running the ios simulator works without needing to run the start-max script before hand. But Xcode --> Archive does not work, I get "FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory". If I comment out |
@Blutude |
Hi @Blutude , it took me a while to figure out how to build release. My previous comment is only for build debug, so it will not work on release version. I wrote a post for this issue. React native max-old-space-size Please let me know if you still have the issue |
Where is the babelrc located? |
Hi @mikeRChambers610 , if you are using the latest react-native, the |
Adding the ignore alone was not sufficient for me using react native through expo. I also had to prepend |
I am surprised to say that I have looped back around to this issue. I am using expo SDK 31 + import AWS from 'aws-sdk/dist/aws-sdk-react-native'; Unable to try a few of these fixes since Im using expo. If I comment out the import my app runs fine. Otherwise, I am getting the heap allocation failure. Thanks! Mike |
I tried this a bunch of times and it wouldnt work. After messing with a few other things and coming back to this simple fix, Im back up and running. Thank you! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Hi everyone, I know this is an old issue and many people point to this link for the answer:
JavaScript heap out of memory
However, I cannot solve the issue by following the solution.
My code work like a charm until I add this line:
I try to add some code to my package.json and aws-sdk package.json but non of them work.
Please help me if you know anything about this issue. Thank you in advance!
The text was updated successfully, but these errors were encountered: