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 #3728
Comments
Anyone who can resolve this issue? |
According to the stacktrace of the error, it seems like you're trying to initialize an array with way too many elements, this is caused by the V8 engine as there's a maximum array size specified. The maximum amount of elements can vary depending on the target machine, but the common maximum size is the 32-bit unsigned integer, AKA 4,294,967,296 (4,29 billion) elements, if you try to create an array larger than this, that can be caused, although as said, this is depenedent on the target machine and the maximum heap it could provide as well. |
How can I find out which line of code causes the array that is too big? Too bad there isn't a stacktrace of the Javascript code that causes it. After all, there is a specific line of code that adds the element that makes the array too big. In my case, it seems to be a non-terminating loop that adds elements to an array. Of course there are methods to find the cause, but a stacktrace would be quite helpful. |
I moved "react-scripts": "5.0.1" from dependencies to devDependencies in package.json , this saved me. |
It works for me. What is the impact of this config change? |
Refer to nodejs/help#3728
Refer to nodejs/help#3728
how did you fix that error in your code? cause am having the same error |
|
I was having this issue with Nestjs v 9.20 when I tried to install |
I'm having this issue with NextJS 12.3 when Edit: I resolved it by deleting the |
What I want to know is why this error instantly crashes Node with no backtrace and no meaningful explanation - surely this could just be handled by throwing an exception, which would allow the error to be caught by test runners and presented nicely in CI rather than causing everything to break. |
I moved "react-scripts": "5.0.1" from dependencies to devDependencies in package.json , this saved me. |
i encountered this error using JSFuck 0.5.0 |
Thank's its work for me 👍❤️ |
In my case, it was a cyclical dependency within a monorepo project. Turbo was able to recognise this when I tried to run a custom cleanup job, which removes all |
@yanickrochon could you share the contents of your cleanup job? I am facing the same issue in a monorepo project. |
@tom-carbontrail sure! The turborepo's root {
"private": true,
"packageManager": "pnpm@8.10.2",
"scripts": {
"reset": "turbo reset && rimraf pnpm-lock.yaml node_modules && pnpm i"
},
"devDependencies": {
"rimraf": "^5.0.5"
}
} The {
"$schema": "https://turborepo.org/schema.json",
"pipeline": {
"reset": {
"cache": false
}
}
} Each of my {
"name": "@vit3x/accounts",
"scripts": {
"reset": "rimraf .next .turbo node_modules"
}
} Thens imply run |
Ah I see. My files look similar, I wondered if you were running a script or similar to detect cyclic dependencies. I added Thanks for your help. |
@tom-carbontrail |
I moved "react-scripts": "5.0.1" from dependencies to devDependencies in package.json , this saved me too. |
Details
Why this error happend and how can I fix?
Node.js version
v16.13.2
Example code
No response
Operating system
Window 11
Scope
runtime
Module and version
Not applicable.
The text was updated successfully, but these errors were encountered: