You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The import resolution hardhat/console.sol works if you compile with pnpm but fails if you use npx.
Reproduction steps
mkdir compile-error
cd compile-error
hardhat3 --init
# pick the viem stack# compile the contracts created by default
npx hardhat3 compile
# in `./contracts/Lock.ts`, uncomment the line# // import "hardhat/console.sol";# rerun the contracts compile
npx hardhat3 compile
# Compiling your Solidity contracts# Error HHE1206: The import "hardhat/console.sol" from "contracts/Lock.sol" is trying to use # an uinstalled npm dependency.# For more info go to https://hardhat.org/HHE1206 or run Hardhat with --show-stack-traces
However pnpm hardhat3 compile will compile successfully.
The text was updated successfully, but these errors were encountered:
The import resolution
hardhat/console.sol
works if you compile withpnpm
but fails if you usenpx
.Reproduction steps
However
pnpm hardhat3 compile
will compile successfully.The text was updated successfully, but these errors were encountered: