'Error during solidity smart contract deployment : Uncaught Error: Callback was already called
Uncaught Error: Callback was already called. at /home/blockchain/master/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:43:36 at WriteStream. (node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:358:17) at WriteStream.destroy (node_modules/level-ws/level-ws.js:140:8) at finish (internal/streams/writable.js:670:14) at processTicksAndRejections (internal/process/task_queues.js:80:21) at runNextTicks (internal/process/task_queues.js:62:3) at processImmediate (internal/timers.js:434:9)
Solution 1:[1]
Found out this to be a problem with node v14.x and ganache-cli v6.12.2 (ganache-core: 2.13.2).
Installing node v13.9.0 solved the issue for me.
Solution 2:[2]
in my case, reinstalling ganache-cli fixed it for me.
Solution 3:[3]
Install the latest version 7.0.3 of ganache instead ganache-cli
npm install --save-dev ganache
in code just use
const ganache = require('ganache');
const web3 = new Web3(ganache.provider());
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sudeep Sagar |
| Solution 2 | Edwin O. |
| Solution 3 | Yurii Khomych |
