On truffle compile I get : FATAL ERROR: NewNativeModule Allocation failed - process out of memory?

Viewed 191

I`m trying to migrate a solidity smart contract. When trying to migrate with truffle I get: enter image description here

I had this issue a few times and now know that is related to changing solc compilers versions, at least this is how I fixed it until now, but this time nothing I try works.

My contract and imports: enter image description here

What I have tried so far:

  1. Checking all the smart contracts compiler versions and making sure that they are ^0.6.0.
  2. In truffle config, if I change solc compiler version to > 0.8.0 I get:

enter image description here

3.UPDATE: just did a little more research and realized I get the same issue with any other contracts in any other project if I use solc versions: 0.6.0 => 0.7.6... If I use any other solc version the that I get successful compilation and migration of contracts, but I want the use of older compiler versions.

Working in VCS:

Truffle v5.4.11 (core: 5.4.11)

Node v16.2.0

Don`t really know what else to try, any suggestions?

1 Answers

You may want to free up some memory by closing any heavily running applications. Re-run the command. That should cure the (FATAL ERROR: NewNativeModule Allocation failed - process out of memory)

This worked for me under the 'Hardhat' Dev environment

Related