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

WalletConnect v2 does not work with SvelteKit+Vite (rollup) #864

Closed
tfalencar opened this issue Mar 18, 2022 · 7 comments
Closed

WalletConnect v2 does not work with SvelteKit+Vite (rollup) #864

tfalencar opened this issue Mar 18, 2022 · 7 comments

Comments

@tfalencar
Copy link

tfalencar commented Mar 18, 2022

When trying to follow the tutorial on:

https://docs.walletconnect.com/2.0/quick-start/dapps/ethereum-provider

The following error appears:

500
Importing binding name 'PairingTypes' is not found.
moduleDeclarationInstantiation@[native code]
link@[native code]
linkAndEvaluateModule@[native code]
@[native code]
asyncFunctionResume@[native code]
@[native code]
promiseReactionJobWithoutPromise@[native code]
promiseReactionJob@[native code]

Steps to reproduce:

  • Setup a new SvelteKit project
  • Follow documentation from WalletConnect
@tfalencar tfalencar changed the title WalletConnect v2 does not work with Svelte+Vite (rollup) WalletConnect v2 does not work with SvelteKit+Vite (rollup) Mar 18, 2022
@zhanzekun
Copy link

+1

@yekta
Copy link

yekta commented Mar 21, 2022

I'm having the same problem. Are there any good workarounds?

@avivash
Copy link

avivash commented May 24, 2022

@tfalencar as a temporary workaround, I was able to get it all running in sveltekit using these imports. Vite borks unless you import the umd files directly for some reason and the types should work if you add import type to the beginning to denote that it's a typescript import

import WalletConnectProvider from '@walletconnect/ethereum-provider/dist/umd/index.min'
import WalletConnectClient, { CLIENT_EVENTS } from '@walletconnect/client/dist/umd/index.min'
import type { PairingTypes, SessionTypes } from '@walletconnect/types'

@finessevanes
Copy link
Contributor

@tfalencar @yekta is this still an issue?

@tfalencar
Copy link
Author

@finessevanes I think its better to ask the walletconnect's development team if they solved the root cause of this issue.

@glitch-txs
Copy link

I’m closing this issue because it has been inactive for a few months.

Please reopen if you still encounter this issue with the latest version :)

@glitch-txs
Copy link

glitch-txs commented Dec 14, 2023

SvelteKit + Web3Modal example: reown-com/web-examples#346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants