Closed ricardo-cavalheiro closed 2 years ago
hey @ricardo-passos, thanks for calling this out. I think we can provide a better experience here.
FWIW we have templates that work out of the box here: https://github.com/thirdweb-example (including vite templates).
With that said we should handle this properly I'll have an update for you shortly.
this should be fixed by: #62
@ricardo-passos please let me know if you still run into issues after upgrading to the latest version, thanks again for pointing this out to us!
@jnsdls Your fix apparently did the work. I create a new local repo with a fresh install of the packages and everything seems ok.
So, I just scaffolded a vite js app with react-ts template and installed
@thirdweb-dev/react
and@thirdweb-dev/sdk
. But I keep getting this error when I placeThirdwebProvider
anywhere in the code:My guess is that
ThirdwebProvider
doesn't check the environment it is currently running in and tries to callglobal
which is only available in the Node.js environment.You can reproduce this error in this git repository: https://github.com/ricardo-passos/buildspace-dao