WalletConnect / walletconnect-monorepo

WalletConnect Monorepo
Apache License 2.0
1.26k stars 626 forks source link

Can't resolve 'pino-pretty' when installing `@walletconnect/ethereum-provider` with pnpm #4466

Open joaquim-verges opened 2 months ago

joaquim-verges commented 2 months ago

Describe the bug installing @walletconnect/ethereum-provider with pnpm results in the following error at runtime:

Module not found: Can't resolve 'pino-pretty' in '/Users/joaquim/Work/templates/account-abstraction/node_modules/.pnpm/pino@7.11.0/node_modules/pino/lib'

Import trace for requested module:
./node_modules/.pnpm/pino@7.11.0/node_modules/pino/lib/tools.js
./node_modules/.pnpm/pino@7.11.0/node_modules/pino/pino.js
./node_modules/.pnpm/@walletconnect+logger@2.1.2/node_modules/@walletconnect/logger/dist/index.es.js
./node_modules/.pnpm/@walletconnect+universal-provider@2.11.3/node_modules/@walletconnect/universal-provider/dist/index.es.js
./node_modules/.pnpm/@walletconnect+ethereum-provider@2.11.3_@types+react@18.0.0_react@18.0.0/node_modules/@walletconnect/ethereum-provider/dist/index.es.js

It looks like the pino-pretty dependency is not declared properly, resulting in a missing module.

SDK Version (if relevant)

To Reproduce Steps to reproduce the behavior:

  1. pnpm install @walletconnect/ethereum-provider
  2. run the application

Expected behavior no runtime errors

linear[bot] commented 2 months ago

CR-14 Can't resolve 'pino-pretty' when installing `@walletconnect/ethereum-provider` with pnpm

glitch-txs commented 2 months ago

Where are you installing it? Is it Next.js? Same issue in version 2.11?

joaquim-verges commented 2 months ago

yes this was on a next.js project - have not tried 2.11 but seems related to https://github.com/WalletConnect/walletconnect-monorepo/issues/1908

glitch-txs commented 2 months ago

Could you try this: https://docs.walletconnect.com/web3modal/nextjs/about#extra-configuration

diegosano commented 1 month ago

Could you try this: https://docs.walletconnect.com/web3modal/nextjs/about#extra-configuration

I had the same problem and this worked 🚀