walletconnect-monorepo: Error: To use QR modal, please install @walletconnect/modal package

Hello, trying to move from walletconnect v1 to v2 with basic implementation of walletconnect provider for web3js as follow:

npm install @walletconnect/ethereum-provider @walletconnect/modal

import { EthereumProvider } from '@walletconnect/ethereum-provider'
import { WalletConnectModal } from '@walletconnect/modal'

const login = async function(){
   const provider = await EthereumProvider.init({
      projectId: '*********',
      chains: [8001],
      showQrModal: true
    })
   await provider.enable();
   web3 = new Web3(provider)
   const accounts = await web3.eth.getAccounts();
   chain_conf.ethAccount = accounts[0];
 }

But im constantly getting this error: Error: To use QR modal, please install @walletconnect/modal package

even though i installed @walletconnect/modal package, any idea what i’m missing please?

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 18 (7 by maintainers)

Most upvoted comments

Hey everyone, the issue is resolved with this PR https://github.com/WalletConnect/walletconnect-monorepo/pull/3891, pending release

image

I really don’t understand, it is installed for sure, anyway, it can only be on my side i guess, will try figure it and update if it’s something worthy when i hopefully find the issue 😃