Type is not a constructor during hardhat-gas-reporter initialization
0 reputation · 17 Jul 2025, 00:17 UTC
The issue seems linked to a version mismatch between the ethers.js dependency defined in the project and the internal versions expected by the Hardhat environment. While the package.json may show compatible major versions, the dependency tree fails to align the provider classes correctly during the gas reporter's execution phase.
What version ranges of ethers and @nomicfoundation/toolbox are guaranteed to be compatible to avoid this constructor error? Does the internal E.js version used by Hardhat contribute to this resolution conflict when external ethers providers are present?