Version of Hardhat
3.0.0-next.15
What happened?
When modifying the hardhat.config.ts file, it was reporting an error with an unclear error message:

To receive a more detailed error message, we were recommended to run a hardhat3 command, as it would provide more detailed error information.
It turns out that this doesn't work when you are using the network name hardhat.
When you change the name to hardhat2, the following error information is reported when you run hardhat3 --version:
Error HHE15: Invalid config:
* Config error in config.networks.hardhat2.type: Invalid discriminator value. Expected 'http' | 'edr'
Minimal reproduction steps
- Modify the default Hardhat config to include a network named
hardhat:
networks: {
hardhat: {
forkConfig: {
jsonRpcUrl: "https://eth-mainnet.g.alchemy.com/v2/<api_key>",
}
},
}
- Run
hardhat3 test
- No error is reported, even though the config is invalid
Search terms
No response