-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[bug] CustomElementRegistry.define: 'w3m-box-button' has already been defined as a custom element #921
Comments
Same error for me. Fresh nextjs installation nextjs example |
I was having the same issue. I found installing (or downgrading to) It looks like the root cause is that 1) This can cause the project to have two versions of At a project level, I suggest separating I have just jumped in to this repository today so I might have some misunderstanding though 🙇♂️. |
Provided codesandbox example uses ethers v6, wagmi only works with v5. Also, if there are multiple versions of ui package, seems like something might've gone wrong during dependency update / downgrade. Could you try removing |
attached the minimal example with the following deps:
To build the
produces the error: |
Same issue. Downgrade to web3modal/[email protected], as suggested by mecab, solves the issue. |
@0xasimetriq I have tried removing I still think it's an issue that relates to the dependency tree structure. You can see it by
The point is On the other hand, Obviously we use
But these ui versions are different so they tries to define a component with same name and ends up with the error. (If you downgrade |
@mecab can you try the same, but downgrade to |
Also for anyone who wants to test against latest wagmi version, you can use this canary release 2.2.0-afa987d |
@0xasimetriq I don't have the minimum example code at the moment so I cannot test it very soon, but it seems to work fine theoretically since a transient dependency
|
I will validate it soon and also the canary version soon. |
Confirming installing both
I am happy to test the canary release, but
For the easiness of testing, I still suggest making any wants of |
@mecab You should only need to install wagmi 0.11.x (it will have core as dependency) 👍 |
@0xasimetriq v2.2.0 works, thank you!! 👏 Here's my packages installed -- just for the people to see this in the future.
|
Link to minimal reproducible example
https://codesandbox.io/s/optimistic-estrela-uo5joj?file=/src/index.js
Summary
Uncaught (in promise) DOMException: CustomElementRegistry.define: 'w3m-box-button' has already been defined as a custom element [app.min.js:60]
initUi client.ts:36
AsyncFunctionThrow self-hosted:814
(Async: async)
VD client.ts:17
initialize client.ts:36
InterpretGeneratorResume self-hosted:1822
AsyncFunctionNext self-hosted:810
(Async: async)
init client.ts:36
Ofe walletConnect.js:222
AsyncFunctionNext self-hosted:810
(Async: async)
XD walletConnect.js:208
nN walletConnect.js:63
kfe utils.ts:41
Hnt app.js:57
app.js:29
List of related npm package versions
The text was updated successfully, but these errors were encountered: