2

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?

heyooo12
  • 139
  • 3
  • 16

1 Answers1

0

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

AP8-JINC
  • 1
  • 1
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 01 '22 at 09:43