Open ersanyakit opened 1 year ago
Im using VITEJS + React TS
Seeing an error when trying to use wallet connect in our dapp when deployed on IPFS.
activate.ts:57 TypeError: Og2.default.init is not a function at hr2.createClient (index.cjs.js:27:29719) at hr2.initialize (index.cjs.js:27:29572) at hr2.init (index.cjs.js:27:26718) at I2.initialize (index.cjs.js:1:6874) at I2.init (index.cjs.js:1:2663) at WalletConnectV2.<anonymous> (index.js:87:79) at Generator.next (<anonymous>) at fulfilled (tslib.js:112:62)
Test URL : https://imon.ai
Have you managed to resolve this issue?
yes, its fixed. just update your vite.config.ts
alias: { '@walletconnect/ethereum-provider': '../../../@walletconnect/ethereum-provider/dist/index.es.js', '@walletconnect/utils': '../../../@walletconnect/utils/dist/index.umd.js', '@': path.resolve(__dirname, './src'), }
I think this issue is related to #840 and a potential fix in web3-react without updating packaging is here: https://github.com/Uniswap/web3-react/issues/840#issuecomment-1613619864
@ersanyakit thank you for the workaround, it worked for me. bumping this issue
Im using VITEJS + React TS
Seeing an error when trying to use wallet connect in our dapp when deployed on IPFS.
activate.ts:57 TypeError: Og2.default.init is not a function at hr2.createClient (index.cjs.js:27:29719) at hr2.initialize (index.cjs.js:27:29572) at hr2.init (index.cjs.js:27:26718) at I2.initialize (index.cjs.js:1:6874) at I2.init (index.cjs.js:1:2663) at WalletConnectV2.<anonymous> (index.js:87:79) at Generator.next (<anonymous>) at fulfilled (tslib.js:112:62)
Test URL : https://imon.ai