-
Notifications
You must be signed in to change notification settings - Fork 725
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
ReferenceError: Can't find variable: global #734
Comments
Similar issue here using Vite with React. After following that message in the console, it tells me: Looking at Did you have any luck? |
I was able to make the umd build work (via unpkg) with remix |
@gaspardip How did u do that? |
Since |
@esbuild-plugins/node-globals-polyfill was able to help me out with |
This error also happens with Svelte. Is this something that has to be fixed by Svelte+Vite, or can something be done from WalletConnect side? |
Related: vitejs/vite#7257 |
After a bit of digging, this seems to be an old issue (almost 2 years old): #341 |
ahhh so hoped to find a solution here, too bad we can't use it with Vite |
try this |
As @armgit5 mentioned, this currently works: https://stackoverflow.com/questions/70714690/buffer-is-not-defined-in-react-vite
Inside your Import the package:
And then add
Currently working as of 8/2/22 - Vite(2.9.12) / Vue 3(3.2.37) |
For the this results in the following build error:
|
Are you found the solution?, I have the same error |
@thxForu does @FounderCasey's fix work for you?
|
My build
vite
vue3
and packagesvue-router
andpinia
. I have tried a lot variants and even the simplest one throws the same error every time. When I try to initialize WallectConnectProvider like that:Page immediately crushes with error:
ReferenceError: Can't find variable: global
.Seems like this problem appeared on vue3 + vite. I researched a lot and found that the problem possible on
walletconnect
lib sideRepo for recreation of problem: vue-wc-problem
Node version
16.13.2
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
I have tried in dev and build modes same problem
The text was updated successfully, but these errors were encountered: