0

Can you please help me with this error ! How to fix this ??

web3.eth.getAccounts(console.log)

TypeError: this.provider.sendAsync is not a function at RequestManager.sendAsync (/home/chaitanyarajeev/ethereum_voting_dapp/chapter1/node_modules/web3/lib/web3/requestmanager.js:80:19) at Eth.get [as getAccounts] (/home/chaitanyarajeev/ethereum_voting_dapp/chapter1/node_modules/web3/lib/web3/property.js:116:33)

3
  • Add the source code so we can take a look.. Mar 11, 2019 at 5:10
  • web3.eth.getAccounts(console.log) TypeError: this.provider.sendAsync is not a function at RequestManager.sendAsync (/home/chaitanyarajeev/ethereum_voting_dapp/chapter1/node_modules/web3/lib/web3/requestmanager.js:80:19) at Eth.get [as getAccounts] (/home/chaitanyarajeev/ethereum_voting_dapp/chapter1/node_modules/web3/lib/web3/property.js:116:33) > Mar 11, 2019 at 5:58

1 Answer 1

2

Try this way:

web3.eth.getAccounts( (error, accounts) => { ... } )

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.