I wanted to play around with web3modal (walletconnect) in typescript.
I followed the official guide, but was unable to finish my setup due to dependency problems
to reproduce simply run the following:
npx create-react-app web3modal --template typescript
cd web3modal
npm install @web3modal/ethereum @web3modal/react wagmi viem
so I tried to solve it:
npm i typescript@^5
(which results in warning shown below)
warnings screenshot
npm install @web3modal/ethereum @web3modal/react wagmi viem
which results in more errors now, screenshot truncated
more errors screenshot
I tried searching for a version of web3modal that uses typescript ^4, but after going down to 2.3.0 - it still sits at 5.0.4.
so my question is:
is there any react/typescript example that uses up to date versions of web3modal? and if not - what are the versions of web3modal/wagmi/viem that I can downgrade to to still use typescript 4.9.5?
edit: I'm aware that this exists, but it's missing the typescript part
This is related to wagmi dep https://wagmi.sh/react/typescript
you'll need to run npm i --legacy-peer-deps
and for compile issues:
Try adding "skipLibCheck": true
in the tsconfig.json file.