Yarn start from terminal and test it on Chrome v99 on localhost:3000
you want to get rid of the error or to make it work?
you use react?
also, I guess that you have latest version of Moralis SDK
I would like to make it work. Yes, the app has been created with yarn create-react-app test
and all Moralis dependecies added with yarn add moralis react--moralis
(that should add the latest version, if I understood right).
Thank you very much for your help, btw.
Hello, i will create a simple login with web3auth following the docs to test this (reproduce)
and see what the actual problem is ?
There is no --
in react-moralis
, idk if this was a mistake here, it should be yarn add moralis react-moralis
Hello, i ran a test and i made a dapp with login for moralis x web3auth and it seems to be working alright , i followed the docs and the tutorial and everything seem to be working and i got no errors, just a quick note, you do not import web3Auth into the code, but you do install the package
check the test site (https://moralisweb3authtest.netlify.app/) and the code is in the site, but here it is (https://github.com/0xPr0f/web3auth), you can also clone and then yarn
and build off the project, i only created a react app (webpack 4) and i integrated the login following the docs
Typo, my damned fat fingers. Thanks for pointinig that out
Thank you very much: I’ll go through it and will update here. First note: I’ve always used webpack 5. I’ll try with webpack 4 following your footsteps and check if webpack version has any role in this.
Hi @qudusayo, thanks for helping. Yes, I’ve already created a Web3Auth.io account and configured it.
Follow up:
- cloned @0xprof git, performed
yarn install
, thenyarn start
: web3auth integration works fine - cloned @0xprof git, changed version of
react-scripts
to 5.0.0 in package.json, performedyarn install
, thenyarn start
: web3auth not installed error
In both cases modifed Moralis serverUrl and appId and Web3Auth clientId with mine.
Seems to me that something breaks up when using webpack 5
yes, some of moralis dependencies doesn’t work well with webpack 5, but moralis does.
it seem web3auth also doesn’t work well, probably something they will update in the furture
glad you are all sorted out and also @chad125 should be too
I ran your git project with my clientId without issue. Still unable to get it working in my project, though my code is virtually identical. Tried different react-scripts version, yarn instead of npm, still no go. Clicking my button throws:
Uncaught (in promise) Error: "@web3auth/web3auth" not installed, please install at Web3AuthConnector.js:147:21 at tryCatch (runtime.js:63:40) at Generator.invoke [as _invoke] (runtime.js:294:22) at Generator.next (runtime.js:119:21) at asyncGeneratorStep (asyncToGenerator.js:5:20) at _next (asyncToGenerator.js:27:9) at asyncToGenerator.js:34:7 at new Promise (<anonymous>) at new Wrapper (export.js:18:24) at Web3Auth3.activate (asyncToGenerator.js:23:12)
I’ll probably just leave it out of the project at this point
*Vite(2.8) React App
Maybe issues with package lock? Or clear modules and install everything again. Or build project again with the working example as a base. It’s not always seamless going from/to v5/v4.
Eventually these tools should update to be v5 compatible so probably easier to wait unless you really need it implemented in your project now.
Yes I tried package and module removal as well. I’ll just leave it out of this project, or at least for now, but ok walking away with a thorough understanding of web3auth for the future.
Hi @alex, thanks for helping. i think that you’re right: I will skip this and go without Web3Auth integration waiting for updates. I’ll keep this open for the record and will update it if and when I’ll work it out
@alex @chad125 @B.One This is an issue with react script (it isnt actually an issue), but looks like web3Auth is most stable with react script 4, so if you plan on integrating web3Auth, it is advisable you use react script 4, This issue is due to the react script as outlined above
*I ran new builds with react-script 4 as well as 5 and issues remained the same, no worries. Thanks for digging in a bit on this though.
sure, feel free to check the working demo of moralis web3auth
(https://moralisweb3authtest.netlify.app/)
Hello guys,
It works if you use the CDN link.
I’ve just tested it with my app.html (I’m using sveltekit)