Hardhat V3 has breaking changes and is not compatible with V2 so this guide must be followed to migrate: https://hardhat.org/migrate-from-hardhat2