-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
index.js:419 Uncaught ReferenceError: require$$0$1 is not defined when I add @walletconnect/web3-provider #6404
Comments
GitHub issues aren't the right place for support questions like this. Please ask on StackOverflow or in our Discord chat room. |
just saying this same issue occurred with me, left me lost. If it's not a svelte specific issue (seems it is) it would have been nice to point people in the right direction, given that this is the only google hit for the issue. |
@johnnguyen-nodejs Any luck with that? I seem to have a similar issue described here: #6891 |
Sharing my experience on how I managed to resolve this issue, for those who come by. TLDR; I managed to make it work by replacing the library that a module was using, which was causing the error. I had to clone the module and patch it to use an alternative, to one that did work. The problem I encountered this issue after installing xast-util-from-xml, which uses an XML parser called sax-js (I don't know much about XML parsing). Browser complained about Here the bundle is passing Working for a solution Searching through github issues and stack overflows, all I can find is that it's related to the modules not being updated to new module importing scheme (node modules, requires and imports, duh). There were several questions, but I couldn't find a general answer to apply. Most of the questions were from the svelte users, but the community didn't seem to think it was the problem for the framework to fix. I went to check out the sax-js repo, but it was pretty much complete, where no meaningful code commit was done after 2017. There were questions on the issue page whether the project is still alive, and directions for newer alternatives. In the end, I checked out another alternative xml parser project(saxes), confirmed that using the module did not raise any errors, and patched the original xast-util-from-xml code to use the new xml parser. I cloned the project and just changed the code until the implemented tests pass. Fortunately XML parsers obey a well-defined specification, and there were only a few code changes to apply. It took several hours to make most of the tests pass though -- and in the end I couldn't make all of them pass, but just enough to bare. Not the best solution I can find, but it did work for me. |
@jangxyz Have you tried Webpack instead Rollup? |
@srokatonie No, I haven't tried webpack. |
When i : import { WalletConnectProvider } from "@walletconnect/web3-provider;
and setup json() in rollup.config.js
can anyone help me ????
The text was updated successfully, but these errors were encountered: