perawallet / connect

JavaScript SDK for integrating Pera Wallet to web applications.
https://perawallet.app
Other
64 stars 20 forks source link

Getting error 'WalletConnect cannot be invoked without 'new' #103

Open AlgorandDev opened 1 year ago

AlgorandDev commented 1 year ago

Hi team and thanks for your incredibile work.

While i have no problems establishing a wallet connection locally and it works smoothly, i get the following error if my svelte app is deployed on vercel/netlify: "PeraWalletConnectError: Class constructor WalletConnect cannot be invoked without 'new'"

On the console: "TypeError: Class constructor WalletConnect cannot be invoked without 'new' at new r (index.4b62f2d5.js:10:2232) at index2368cd55.PeraWalletConnect. (index.4b62f2d5.js:1850:12595) at Generator.next () at V (index.4b62f2d5.js:1850:1374)"

Anything i may be doing wrong?

MacroChip commented 1 year ago

+1 to this. Trying to figure out what part of the build process is causing this.

MacroChip commented 1 year ago

Upgrading to vite 4 from vite 3 fixed this for me