Skip to content
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

[WIP] fix: [email protected] window undefined issue #47

Merged
merged 9 commits into from
Mar 16, 2023

Conversation

Ansonhkg
Copy link
Collaborator

@Ansonhkg Ansonhkg commented Mar 15, 2023

What

Potential fix for

next-dev.js?3515:20 DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "w3m-box-button" has already been used with this registry
    at eval (webpack-internal:///./node_modules/@walletconnect/ethereum-provider/dist/index.es.js:43:63)

while running await import("@lit-protocol/lit-node-client") in next.js

Solution

Upgrade to

"@walletconnect/ethereum-provider": "^2.5.0",

Test

This PR is published to ^2.1.70

// eg.
yarn add @lit-protocol/[email protected]

Update - 1

@Ansonhkg Ansonhkg changed the title chore: upgrade walletconnect to 2.5.0 [WIP] chore: upgrade walletconnect to 2.5.0 Mar 15, 2023
@Ansonhkg
Copy link
Collaborator Author

Ansonhkg commented Mar 15, 2023

It appears that there is an issue with @walletconnect/[email protected], as it is causing a "window is not defined" error.

error re-produced in this repo:
LIT-Protocol/js-sdk-pr-47@0b3e3b3

New solution

Downgraded the version to @walletconnect/[email protected]

Test

yarn add @lit-protocol/[email protected]

Updated fix on the re-produced PR

Screenshot 2023-03-16 at 00 34 17

@Ansonhkg Ansonhkg changed the title [WIP] chore: upgrade walletconnect to 2.5.0 [WIP] fix: [email protected] window undefined issue Mar 15, 2023
@Ansonhkg
Copy link
Collaborator Author

Ansonhkg commented Mar 16, 2023

As per walletconnect team request we are going to try 2.5.1 and added @web3modal/standalone@^2.2.1 as a dependency to the auth-browser repo that's being used and re-exported in lit-node-client

Test

Changes have been published to --dev tag and can be installed at:

yarn add @lit-protocol/[email protected]

@Ansonhkg
Copy link
Collaborator Author

2.5.1 confirmed working, merging

@Ansonhkg Ansonhkg merged commit db3793f into master Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant