1

When trying to make a help menu for my discord bot everything kind of broke and I keep getting this error.

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF7F4AE7A1F v8::internal::CodeObjectRegistry::~CodeObjectRegistry+114207
 2: 00007FF7F4A76096 DSA_meth_get_flags+65542
 3: 00007FF7F4A76F4D node::OnFatalError+301
 4: 00007FF7F53AB2CE v8::Isolate::ReportExternalAllocationLimitReached+94
 5: 00007FF7F53958AD v8::SharedArrayBuffer::Externalize+781
 6: 00007FF7F5238C7C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1468
 7: 00007FF7F5245929 v8::internal::Heap::PublishPendingAllocations+1129
 8: 00007FF7F52428FA v8::internal::Heap::PageFlagsAreConsistent+2842
 9: 00007FF7F5235559 v8::internal::Heap::CollectGarbage+2137
10: 00007FF7F5233710 v8::internal::Heap::AllocateExternalBackingStore+2000
11: 00007FF7F5258296 v8::internal::Factory::NewFillerObject+214
12: 00007FF7F4F8A765 v8::internal::DateCache::Weekday+1797
13: 00007FF7F5438FC1 v8::internal::SetupIsolateDelegate::SetupHeap+494417
14: 00007FF7F5439EC9 v8::internal::SetupIsolateDelegate::SetupHeap+498265
15: 000002A397CB44C7
[nodemon] app crashed - waiting for file changes before starting...

I'm making it with discord.js and I have looked all over the internet and can't find anything that has solved these issues. Does anyone know how to solve this issue? Please and thank you.

KingsGP
  • 29
  • 7
  • Error relates to memory issues caused by NodeJS. Something in your program may be causing a memory leak. Try commenting out certain procedures, debug and find out whats causing issues. – Elitezen Jun 01 '22 at 23:35
  • I have been trying to do that but can't find anything that I can get rid of. Is there any way I can increase memory or something? – KingsGP Jun 02 '22 at 00:26
  • Have you ensured that there are no endless loops in your project? Also, can you make sure that this doesn't solve your issue https://stackoverflow.com/a/63495296/13785528? – Coder Tavi Jun 02 '22 at 03:29
  • All the commands in the links still don't work for me they return an unknown command error. But I did figure out my issue I re-looked over my code and realized I accidentally used for (let a = 0; a < 4, ++a;) instead of for (let a = 0; a < 4; ++a). – KingsGP Jun 02 '22 at 18:39

0 Answers0