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
An unexpected error occurred when run yarn compile as below output log due to hardhat compile the task before compile the smart contract?
An unexpected error occurred:
tasks/deployers/greeter.ts:4:43 - error TS2307: Cannot find module '../../typechain' or its corresponding type declarations.
4 import { Greeter, Greeter__factory } from "../../typechain";
The text was updated successfully, but these errors were encountered:
Yeah this is a known issue, it's a catch-22 caused by the fact that one of the Hardhat tasks imports the TypeChain bindings which are not generated yet. See dethcrypto/TypeChain#371.
It can be fixed by adding TS_NODE_TRANSPILE_ONLY=true before running the command, but that'd be a chore. That's why I added this flag in the typechain script in package.json; I should create a compile script and add the flag in there too.
It can be fixed by adding TS_NODE_TRANSPILE_ONLY=true before running the command, but that'd be a chore. That's why I added this flag in the typechain script in package.json; I should create a compile script and add the flag in there too.
An unexpected error occurred when run
yarn compile
as below output log due to hardhat compile the task before compile the smart contract?The text was updated successfully, but these errors were encountered: