Minimal reproduction For this issue. npm i --legacy-peer-deps npx hardhat run scripts/script.ts Fix (temporary): npm i --save-dev viem@1