Sudeep Sagar
Sudeep Sagar

Reputation: 151

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)

Upvotes: 2

Views: 667

Answers (3)

Yurii Khomych
Yurii Khomych

Reputation: 1

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());

Upvotes: 0

Edwin O.
Edwin O.

Reputation: 5276

in my case, reinstalling ganache-cli fixed it for me.

Upvotes: 0

Sudeep Sagar
Sudeep Sagar

Reputation: 151

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.

Upvotes: 3

Related Questions