'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
Solution 1:[1]
Run npx hardhat compile
to generate the typechain folder when using hardhat with solidity
As seen in the "Tasks" section of https://www.npmjs.com/package/@typechain/hardhat/v/3.1.0
Solution 2:[2]
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.
https://github.com/dethcrypto/TypeChain/tree/master/packages/hardhat
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | d3vnull10 |