首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TypeError: glob不是一个函数,它是在将typechain-hardhat更新到@typechain/hardhat之后的一个函数。

TypeError: glob不是一个函数,它是在将typechain-hardhat更新到@typechain/hardhat之后的一个函数。
EN

Ethereum用户
提问于 2023-02-06 17:15:52
回答 1查看 600关注 0票数 1

将项目从typechain-hardhat更新到@typechain/hardhat包。

编译项目抛出TypeError: glob不是函数错误。我不能运行脚本,测试,编译等。

代码语言:javascript
复制
An unexpected error occurred:

TypeError: glob is not a function
    at SimpleTaskDefinition.action (C:\Users\user\SmartContracts\trade-smart-contracts\node_modules\@typechain\hardhat\src\index.ts:70:22)
    at Environment._runTaskDefinition (C:\Users\user\SmartContracts\trade-smart-contracts\node_modules\hardhat\src\internal\core\runtime-environment.ts:308:14)
    at Environment.run (C:\Users\user\SmartContracts\trade-smart-contracts\node_modules\hardhat\src\internal\core\runtime-environment.ts:156:14)
    at OverriddenTaskDefinition._action (C:\Users\user\SmartContracts\trade-smart-contracts\node_modules\@typechain\hardhat\src\index.ts:29:5)
    at Environment._runTaskDefinition (C:\Users\user\SmartContracts\trade-smart-contracts\node_modules\hardhat\src\internal\core\runtime-environment.ts:308:14)
    at Environment.run (C:\Users\user\SmartContracts\trade-smart-contracts\node_modules\hardhat\src\internal\core\runtime-environment.ts:156:14)
    at SimpleTaskDefinition.action (C:\Users\user\SmartContracts\trade-smart-contracts\node_modules\hardhat\src\builtin-tasks\compile.ts:1331:63)
    at Environment._runTaskDefinition (C:\Users\user\SmartContracts\trade-smart-contracts\node_modules\hardhat\src\internal\core\runtime-environment.ts:308:14)
    at Environment._runTaskDefinition (C:\Users\user\SmartContracts\trade-smart-contracts\node_modules\hardhat\src\internal\core\runtime-environment.ts:308:14)
    at Environment.run (C:\Users\user\SmartContracts\trade-smart-contracts\node_modules\hardhat\src\internal\core\runtime-environment.ts:156:14)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
EN

回答 1

Ethereum用户

发布于 2023-02-06 18:54:18

我已经解决了这个问题:问题是以前的typechain-hardhat包生成了typechain文件夹,但是现在@typechain/hardhat生成了typechain-types文件夹

票数 0
EN
页面原文内容由Ethereum提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://ethereum.stackexchange.com/questions/144396

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档