JavaScript heap out of memory error
saewitz opened this issue Β· comments
Jonathan Saewitz commented
I ran this command and got this output. It was loading and the most recent message was "β Looking for API definitions..." for a few minutes.
% rdme openapi --github
π email is currently logged in, using the stored API key for this project: project
β Looking for API definitions...
<--- Last few GCs --->
[20995:0x120008000] 274935 ms: Scavenge 4029.4 (4127.4) -> 4015.2 (4127.4) MB, 5.9 / 0.0 ms (average mu = 0.176, current mu = 0.049) allocation failure
[20995:0x120008000] 277277 ms: Mark-sweep 4031.6 (4129.9) -> 4016.6 (4132.7) MB, 2194.8 / 0.0 ms (average mu = 0.155, current mu = 0.132) allocation failure scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x1020e5c84 node::Abort() [.nvm/versions/node/v16.18.1/bin/node]
2: 0x1020e5e74 node::ModifyCodeGenerationFromStrings(v8::Local<v8::Context>, v8::Local<v8::Value>, bool) [.nvm/versions/node/v16.18.1/bin/node]
I wasn't running it in my project directory. I think it was trying to find the API definition files and eventually errored. When I ran it in my project directory it succeeded quickly. There should maybe be a check that if it doesn't find a file soon, it gives a better error like "Did not find file in x seconds, check if you are in the directory with your API definitions".