When using @nomicfoundation/hardhat-toolbox@3.0.0 and importing hardhat-tracer in the Hardhat config hardhat.config.ts, the command npx hardhat test fails with the error:
Error HH21: You tried to access an uninitialized provider. To initialize the provider, make sure you first call `.init()` or any method that hits a node like request, send or sendAsync.
HardhatError: HH21: You tried to access an uninitialized provider. To initialize the provider, make sure you first call `.init()` or any method that hits a node like request, send or sendAsync.
at LazyInitializationProviderAdapter.get _wrapped [as _wrapped] (/.../node_modules/hardhat/src/internal/core/providers/lazy-initializatio
n.ts:32:13)
at isTracerAlreadyWrappedInHreProvider (/.../node_modules/hardhat-tracer/src/wrapper.ts:136:25)
at wrapHardhatProvider (/.../node_modules/hardhat-tracer/src/wrapper.ts:108:7)
at OverriddenTaskDefinition._action (/.../node_modules/hardhat-tracer/src/utils/task-helpers.ts:16:26)
at Environment._runTaskDefinition (/.../node_modules/hardhat/src/internal/core/runtime-environment.ts:333:35)
at Environment.run (/.../node_modules/hardhat/src/internal/core/runtime-environment.ts:166:25)
at main (/.../node_modules/hardhat/src/internal/cli/cli.ts:280:17)
When using
@nomicfoundation/hardhat-toolbox@3.0.0
and importinghardhat-tracer
in the Hardhat confighardhat.config.ts
, the commandnpx hardhat test
fails with the error:P. S.
hardhat-tracer@2.4.0
.