BlockchainCourseNTU / hello-dapp

MVP (Minimal Viable Preparation) for modern dApp developers
15 stars 7 forks source link

yarn compile not generate typeechained folder in section of Add TypeChain plugin #14

Closed zhangyongzhe20 closed 3 years ago

zhangyongzhe20 commented 3 years ago

It seems that the typechained folder is not generated, cause it's cannot be found in during test. image

This is my config file: image

alxiong commented 3 years ago

@zhangyongzhe20 did you add import '@typechain/hardhat'; in your hardhat.config.ts?

also do remember to update your tsconfig.json to add a path so that you can import from '@typechained'.

if it still didn't work, try yarn compile --force (usually when there's no change to contract, the types generation won't be triggered, and --force just force hardhat to re-compile them)

zhangyongzhe20 commented 3 years ago

The typechained folder is generated after running yarn compile --force. Thanks @alxiong