ERESOLVE unable to resolve dependency tree while installing typechain @typechain/hardhat @typechain/ethers-v5
See original GitHub issueHi all,
I’ve tried to install like in the readme file with the command npm install --save-dev typechain @typechain/hardhat @typechain/ethers-v5
and I’ve got this error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: typechain@3.0.0
npm ERR! node_modules/typechain
npm ERR! typechain@"^3.0.0" from @ethereum-waffle/compiler@3.4.0
npm ERR! node_modules/@ethereum-waffle/compiler
npm ERR! @ethereum-waffle/compiler@"^3.4.0" from ethereum-waffle@3.4.0
npm ERR! node_modules/ethereum-waffle
npm ERR! peer ethereum-waffle@"^3.2.0" from @nomiclabs/hardhat-waffle@2.0.1
npm ERR! node_modules/@nomiclabs/hardhat-waffle
npm ERR! dev @nomiclabs/hardhat-waffle@"^2.0.1" from the root project
npm ERR! 1 more (the root project)
npm ERR! peer typechain@"^3.0.0" from @typechain/ethers-v5@2.0.0
npm ERR! node_modules/@typechain/ethers-v5
npm ERR! @typechain/ethers-v5@"^2.0.0" from @ethereum-waffle/compiler@3.4.0
npm ERR! node_modules/@ethereum-waffle/compiler
npm ERR! @ethereum-waffle/compiler@"^3.4.0" from ethereum-waffle@3.4.0
npm ERR! node_modules/ethereum-waffle
npm ERR! peer ethereum-waffle@"^3.2.0" from @nomiclabs/hardhat-waffle@2.0.1
npm ERR! node_modules/@nomiclabs/hardhat-waffle
npm ERR! 1 more (the root project)
npm ERR! dev @typechain/ethers-v5@"*" from the root project
npm ERR! 1 more (the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev @typechain/hardhat@"*" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: typechain@5.0.0
npm ERR! node_modules/typechain
npm ERR! peer typechain@"^5.0.0" from @typechain/hardhat@2.0.2
npm ERR! node_modules/@typechain/hardhat
npm ERR! dev @typechain/hardhat@"*" 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! See /Users/MY_WORKSPACE/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/MY_WORKSPACE/.npm/_logs/2021-06-21T21_07_39_358Z-debug.log
what should I do? the hardhat project is brand new
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
ERESOLVE unable to resolve dependency tree while ...
So try running the following options one by one. 1. Remove node_modules and package-lock.json and then run npm install.
Read more >(Solved) ERESOLVE unable to resolve dependency tree while ...
So try running the following options one by one. 1. Remove node_modules and package-lock.json and then run. npm install. HTML.
Read more >"Unable to resolve dependency tree" error during NPM install ...
I have some experience with npm in the past, though I've never been good at troubleshooting it. npm ERR! code ERESOLVE npm ERR!...
Read more >How to Fix npm ERR ERESOLVE Unable to Resolve ...
#20: peerDependencies in package. · How to install Python Libraries in Visual Studio Code · Unable to resolve dependency tree error when ......
Read more >[Solved] npm ERR! ERESOLVE unable to resolve ... - YouTube
solution at:https://www.readdy.net/Notes/Details/2135Error messages:⠸ Installing packages (npm)...npm ERR! code ERESOLVEnpm ERR! ERESOLVE ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
--force
alone didn’t work for me. I’m using the latest hardhat (2.6.5) and latest typechain hardhat plugin (2.3.0).But this article helped -
https://www.carlrippon.com/upgrading-npm-dependencies/
So I used
npm outdated
to investigate. Which reported -Then -
So far so good. YMMV
@chubbyavo seem to have detected the source of the problem.
Hmm, I think the problem is that
@ethereum-waffle/compiler@3.4.0
is the latest version. I ended up justforce
installing and it worked fine. Thanks though!