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

**URL:** <https://forum.openzeppelin.com/t/sometimes-when-i-run-npx-hardhat-compile-i-get-this-error-fatal-error-newnativemodule-allocation-failed-process-out-of-memory/19726>\
**Category:** Meta\
**Created:** [November 26, 2021, 2:00am UTC](https://forum.openzeppelin.com/t/sometimes-when-i-run-npx-hardhat-compile-i-get-this-error-fatal-error-newnativemodule-allocation-failed-process-out-of-memory/19726 "2021-11-26T02:00:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kelvin\_Okorie](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/kelvin_okorie/32/12570_2.png) [@Kelvin\_Okorie](https://forum.openzeppelin.com/u/Kelvin_Okorie)\
**Post date:** [November 26, 2021, 2:00am UTC](https://forum.openzeppelin.com/t/sometimes-when-i-run-npx-hardhat-compile-i-get-this-error-fatal-error-newnativemodule-allocation-failed-process-out-of-memory/19726/1 "2021-11-26T02:00:26Z")

</div>

Sometimes when i run this command `npx hardhat compile` on my windows cli i get the error below  
[![screenshot of error](https://i.stack.imgur.com/Xo2gI.jpg)](https://i.stack.imgur.com/Xo2gI.jpg)

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](https://medium.com/@vuongtran/how-to-solve-process-out-of-memory-in-node-js-5f0de8f8464c)

OS: WINDOWS 10  
CLI: WINDOWS CMD
