I wrote a solidity contract using version 0.4.24 using OpenZeppline-solidity version 1.12.0. This used to deploy using the Nodejs version 8.12. The Nodejs version 8 is no longer being maintained from Jan 2020, so I updated it to 12.18.3 LTS. Now the deployment throws the following error.
truffle deploy --network development
throws
RangeError: Maximum call stack size exceeded
Truffle v5.1.39 (core: 5.1.39) Node v12.18.3
truffle-config.js
...
compilers: {
solc: {
version: "0.4.24",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
}
}
}
Node.js versions are mostly backward compatible, meaning that code you wrote for Node 8 will work on Node 10 or 12.
package.json dependencies
...
"dependencies": {
"openzeppelin-solidity": "^1.12.0",
"@truffle/hdwallet-provider": "^1.0.42",
"retry": "^0.12.0",
"solc": "^0.4.24",
"truffle": "^5.1.39",
"web3": "^1.2.11"
}