dappuniversity / web3_examples

Learn Web3.js by Example With This Ethereum Blockchain Developer Crash Course!
157 stars 113 forks source link

getBalance() has an error: TypeError: this.provider.sendAsync is not a function #1

Open amyzx opened 6 years ago

amyzx commented 6 years ago

image

hi, I'm working with your web3.js course, but I found the code in first chapter doesn't work. I used ganache, and tried to get one account's balance. I also tried to call getBalance function like this: web3.eth.getBalance(account)
It doesn't work, either. Could you help me to deal with this problem? Thanks!

vaibnak commented 5 years ago

issue solved ? if not try uninstalling and reinstalling web3js library as it is working fine in my system My configurations:- OS :- ubuntu 18.04 node - 8.10.0 npm -3.5.2