Reached heap limit Allocation failed - JavaScript heap out of memory

I have a problem when executing the command “yarn frontity dev” in my project,this is the error:

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF7F84779CF v8::internal::CodeObjectRegistry::~CodeObjectRegistry+114207
2: 00007FF7F8406096 DSA_meth_get_flags+65542
3: 00007FF7F8406F4D node::OnFatalError+301
4: 00007FF7F8D3B1EE v8::Isolate::ReportExternalAllocationLimitReached+94
5: 00007FF7F8D257CD v8::SharedArrayBuffer::Externalize+781
6: 00007FF7F8BC8B9C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1468
7: 00007FF7F8BC5CB4 v8::internal::Heap::CollectGarbage+4244
8: 00007FF7F8BC3630 v8::internal::Heap::AllocateExternalBackingStore+2000
9: 00007FF7F8BE81B6 v8::internal::factory::NewFillerObject+214
10: 00007FF7F891A685 v8::internal::DateCache::Weekday+1797
11: 00007FF7F8DC8EE1 v8::internal::SetupIsolateDelegate::SetupHeap+494417
12: 000002C34FB32772
error Command failed with exit code 134

Is there a way to clean my heap memory?