Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM issue when running web client #7

Open
Dinnerspy opened this issue Mar 7, 2021 · 6 comments
Open

NPM issue when running web client #7

Dinnerspy opened this issue Mar 7, 2021 · 6 comments

Comments

@Dinnerspy
Copy link

When running the demo using npm run dev. I get the following errors. Uncaught TyoeError: Web3 is not a constructor on line 29 of the node dependency truffle-contract.js and Uncaught (in promise) Reference Error: Web3 is not defined at object.loadweb3(appjs:16). I have not modified any of the code. I installed it by typing git clone https://github.com/dappuniversity/eth-todo-list.git. then I type npm install followed by npm run dev.

@Dinnerspy
Copy link
Author

I was able to resolve the issue using a web3 workaround. now i cant seem to get the tasks to show in the webpage.

@i001962
Copy link

i001962 commented Mar 9, 2021

I think this has something to do with metamask removing window.web3 but I haven't figured out the workaround. @Dinnerspy would you mind posting your workaround? I seem to be stuck at about the same place you are...

@Dinnerspy
Copy link
Author

@i001962 adding this https://www.npmjs.com/package/@metamask/legacy-web3 to the node modules along with adding this chrome extension https://github.com/MetaMask/legacy-web3-extension with the current metamask.

@Dinnerspy
Copy link
Author

@i001962 Let me know if you can figure out why transactions with long length text wont be created as events.

@i001962
Copy link

i001962 commented Mar 10, 2021

@Dinnerspy I ended up installing "@truffle/contract": "^4.3.9". Still working through some issues and haven't fully committed to solving this... I may just move on to something else

@jordie9669
Copy link

Also getting the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants