-
Notifications
You must be signed in to change notification settings - Fork 20
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
Error [ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory #137
Comments
@Yusufkulcu Dumb question.. but did you try it again following the instructions in the warning message shown in your screenshot about how to potentially resolve out of memory issues by using the If you googled "node js heap out of memory" or similar you would also turn up results like this, which also talk about using |
The solution is to follow the instructions in the message. I think the instructions are not step-by-step, so let me give one here. MacOS / LinuxNODE_OPTIONS="--max-old-space-size=8192" npx @wakaru/cli unminify Windows (CMD)set NODE_OPTIONS=--max-old-space-size=8192 && npx @wakaru/cli unminify 8192 in the command is 8GB. You can adjust the number based on your PC's specs and the size of the file. BTW, what is the size of your input file? |
The file size is around 6-7mb. I'm trying the suggestion you said. How do we need to give the 8gb value you specified? |
@Yusufkulcu I'm assuming you mean 'why do we need to specify 8gb if the file is only 6-7mb'? If so, it's because the process of unminimising the code needs to parse the plain text of the original file into a number of objects and data structures that are held and manipulated in memory, which causes it to expand to a much larger size during the process; and as the StackOverflow link I sent suggested,
@pionxzh Might be worth adding a section to the README with those instructions, and/or expanding them in the message shown in app (or maybe both/could link the in-app message to that part of the README for further details) |
I will try to expand the instructions or link them to README to check the detailed guide. |
@Yusufkulcu I give the 8GB based on your mentioned "powerful PC." Based on my experience, 6-7 MB should only need ~4GB. |
Describe the bug
When I use the "npx @wakaru/cli unminify" command in my js file, it gives the following error. The computer I use is extremely powerful. What should I do? I've added the relevant file below.
"Since the javascript file was not loaded, I set the extension to txt"
main.txt
Input code
No response
Reproduction
No response
Steps to reproduce
No response
Expected behavior
no memory error
Actual behavior
No response
The text was updated successfully, but these errors were encountered: