hardhat
hardhat copied to clipboard
`hardhat-viem`: `typescript` dependency conflicts
The [email protected] package has its typescript version set to ~5.0.0 and it's conflicting with the project I'm working on which uses version ^5.4.5.
Worth noting that ~5.0.0 only allows range from 5.0.0 until 5.1.0.
Is there a reason for that? Can you set it to ^5.0.0 instead (which will support up to <6.0.0 versions)?
I have the same problem
packages/contracts
└─┬ @nomicfoundation/hardhat-viem 2.0.3
└── ✕ unmet peer typescript@~5.0.0: found 5.5.3
For now I add this to package.json
"overrides": {
"@nomicfoundation/hardhat-toolbox-viem": {
"typescript": "$typescript"
}
},
Typescript has been removed as a peer dependency for hardhat-viem: https://github.com/NomicFoundation/hardhat/releases/tag/%40nomicfoundation%2Fhardhat-viem%402.0.6