Module not found: Can't resolve '@walletconnect/client'

im using nextjs 13 and i follow their nextjs guide step and step. eventually i get this error

@web3auth/modal/dist/modal.esm.js
./pages/index.tsx">
error - ./node_modules/@web3auth/wallet-connect-v1-adapter/dist/walletConnectV1Adapter.esm.js:2:0
Module not found: Can’t resolve ‘@walletconnect/client’

Import trace for requested module:
./node_modules/@web3auth/modal/dist/modal.esm.js
./pages/index.tsx

i try next 12 same result, i tried vuejs same, reactjs same.

this is my package.json

{
  "name": "i-took-almost-a-week-to-install-web3auth",
  "version": "0.0.9999",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@web3auth/base": "^4.4.0",
    "@web3auth/modal": "^4.4.2",
    "@web3auth/openlogin-adapter": "^4.4.2",
    "web3": "^1.8.2",
    "i18n": "^0.15.1",
    "next": "^12.3.1",
    "react": "18",
    "react-dom": "18"
  },
  "devDependencies": {
    "@types/elliptic": "^6.4.14",
    "@types/node": "17.0.35",
    "@types/react": "18.0.9",
    "@types/react-dom": "18.0.4",
    "eslint": "8.15.0",
    "eslint-config-next": "12.1.6",
    "typescript": "4.6.4"
  }
}


Originally posted by: e8ward

Check the discussion at: https://github.com/orgs/Web3Auth/discussions/1359

If you are using pnpm, please install 2 packages below
@walletconnect/client@~1.x @walletconnect/types@~1.x



Originally posted by: ieow

i solved the problem with using the NPM to install everything.



Originally posted by: e8ward

i try all above but not working anything for me

Hey @divyesh,

It looks like there’s a mix-up with the packages. This thread is actually focused on @walletconnect/client, but your issue seems to be with @walletconnect/sign-client. To fix the dependency problem, try running npm i -S @walletconnect/sign-client in your project.

Give that a shot and let us know if it sorts out the issue for you.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.