1

I'm trying to build a browser UI to interact with my Solidity smart contract that is deployed on my local Ganache blockchain. But I can't seem to get my index.html file to connect to Metamask. I keep getting this error when opening my index.html in Chrome:

main.js:5 Uncaught ReferenceError: Web3 is not defined
    at main.js:5
(anonymous) @ main.js:5

Github repo: https://github.com/Lennardmulder/Mannencoin

What am I missing here?

1 Answer 1

1

Error says it all, you are missing the web3 library in your local project. Simply follow the steps here for downloading the library and how to attach it to your project. There are examples for nodejs, browser of typescript enviroments.

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.