I reduced the memory in the make file and it worked. NODE_OPTIONS=–max-old-space-size=4500
sometimes it worked but for me it didn’t work.
It works, first, you need to check the available memory, and then you can try allocating memory for “make”. Make sure you keep some memory for other processes as well.