第五课-单元测试,安装 hardhat-deploy-ethers 报错 #62
Unanswered
huang4718739
asked this question in
Q&A
Replies: 2 comments
-
|
这个错误是 hardhat-deploy 版本太高的缘故 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
getContract 定义果然是在hardhat-deploy-ethers 这个包里,最新版本0.4.2是一年之前的,显然不再维护了。https://github.com/wighawag/hardhat-deploy-ethers/blob/main/src/helpers.ts#L142 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
npm install --save-dev @nomicfoundation/hardhat-ethers ethers hardhat-deploy hardhat-deploy-ethers
错误 信息如下:
web3_tutorial % npm install --save-dev @nomicfoundation/hardhat-ethers ethers hardhat-deploy hardhat-deploy-ethers
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: web3_tutorial@1.0.0
npm error Found: hardhat-deploy@1.0.1
npm error node_modules/hardhat-deploy
npm error dev hardhat-deploy@"^1.0.1" from the root project
npm error
npm error Could not resolve dependency:
npm error peer hardhat-deploy@"^0.12.0" from hardhat-deploy-ethers@0.4.2
npm error node_modules/hardhat-deploy-ethers
npm error dev hardhat-deploy-ethers@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /Users/huangyulin/.npm/_logs/2025-03-19T16_34_49_101Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/huangyulin/.npm/_logs/2025-03-19T16_34_49_101Z-debug-0.log
Beta Was this translation helpful? Give feedback.
All reactions