-
Notifications
You must be signed in to change notification settings - Fork 45
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
Fatal JavaScript invalid size error 169220804 #91
Comments
Try increasing the heap memory available to your app by using the --max-old-space-size flag, like |
@miktam Thanks for your response. |
@RezaAb, thank you for the update! Heavily nested arrays will cause the module to throw, as the engine can not allocate memory for a huge data structure with the nested arrays. This code crashes tests:
Regarding remediation, the only way I see at the moment is to look at the object first and nicely return -1 when the object's depth exceeds a certain threshold. At least it will not crash the invoking app. This does not feel like an ideal solution. Are there any better ways? |
I got this error in my app with a large object that includes arrays of arrays.
The error closed the app even by error handling.
nodejs version: 16.20
The text was updated successfully, but these errors were encountered: