0
npm install -D @nomiclabs/hardhat-waffle ethereum-waffle
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: undefined@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/ethers
npm ERR!   peer ethers@"6.x" from @typechain/[email protected]
npm ERR!   node_modules/@typechain/ethers-v6
npm ERR!     peer @typechain/ethers-v6@"^0.5.1" from @typechain/[email protected]
npm ERR!     node_modules/@typechain/hardhat
npm ERR!       @typechain/hardhat@"^9.1.0" from the root project
npm ERR!   peer ethers@"^6.1.0" from @typechain/[email protected]
npm ERR!   node_modules/@typechain/hardhat
npm ERR!     @typechain/hardhat@"^9.1.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! dev @nomiclabs/hardhat-waffle@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/ethers
npm ERR!   peer ethers@"^5.0.0" from @nomiclabs/[email protected]
npm ERR!   node_modules/@nomiclabs/hardhat-waffle
npm ERR!     dev @nomiclabs/hardhat-waffle@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /home/lokicheck/.npm/_logs/2024-01-10T14_58_51_279Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /home/lokicheck/.npm/_logs/2024-01-10T14_58_51_279Z-debug-0.log
2
  • I've got the same thing, have you found a solution yet? I believe it has something to do with the dependencies but I couldn't figure it out. Commented Jan 16 at 4:07
  • Do check out my latest answer, and upvote it Commented Jan 17 at 1:22

1 Answer 1

0

I removed the node modules, and use yarn instead, then followed the instructions of "npm install dependencies" from the terminal. The problem will be fixed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.