Sometimes when i run `npx hardhat compile` i get this error: FATAL ERROR: NewNativeModule Allocation failed - process out of memory

Sometimes when i run this command npx hardhat compile on my windows cli i get the error below
screenshot of error

After sometime the error just kind of goes away.
It goes away probably after i've restarted my system or created a new hardhat project and imported the code there.

But this is happening too often, what could be the cause?

I've done quite some research and some answers suggested it might be a problem with Node and the application's memory allocation, but i dont know how i would apply the solutions to a Hardhat project.

Here is a link to one possible solution: https://medium.com/@vuongtran/how-to-solve-process-out-of-memory-in-node-js-5f0de8f8464c

OS: WINDOWS 10
CLI: WINDOWS CMD