You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Google browser console "web3 is not defined”,It has been bothering me for a long time. Please tell me how to solve it. I have been trying to solve this problem,Looking forward to your reply!
The text was updated successfully, but these errors were encountered:
At line 103 of file app/app.js, there is a statement window.web3 = web3; with condition if (window.web3), comment out the condition line, then there would be always a defined web3.
I'm not sure whether this is the correct solution, it just works for me.
if (typeof web3 !== 'undefined') {
web3 = new Web3(web3.currentProvider);
} else {
// set the provider you want from Web3.providers
web3 = new Web3(new Web3.providers.HttpProvider("http://"+GETH_HOSTNAME+":"+GETH_RPCPORT);
}
Google browser console "web3 is not defined”,It has been bothering me for a long time. Please tell me how to solve it. I have been trying to solve this problem,Looking forward to your reply!
The text was updated successfully, but these errors were encountered: