I can't get "Typechain" folder when I install dependencies using hardhat

When I install all the dependencies but didn't get the "typechain" folder in the typescript hardhat. how to get it?

npm init

npm install --save-dev hardhat

npx hardaht

Select an Advance sample project ....

npm install --save-dev "hardhat@^2.8.2" "@nomiclabs/hardhat-waffle@^2.0.0" "ethereum-waffle@^3.0.0" "chai@^4.2.0" "ethers@^5.0.0" "solhint@^3.3.6" "solidity- coverage@^0.7.16" "@typechain/ethers-v5@^7.0.1" "@typechain/hardhat@^2.3.0" "@typescript-eslint/eslint-plugin@^4.29.1" "@typescript-eslint/parser@^4

1

2 Answers

Run npx hardhat compile to generate the typechain folder when using hardhat with solidity

As seen in the "Tasks" section of

I had a similar issue after deleting the the typechain folder

be sure to run the following command first:

npx hardhat clean or in my case yarn hardhat clean

from the documentation

Warning: before running it for the first time you need to do hardhat clean, otherwise TypeChain will think that there is no need to generate any typings.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like