Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hardhat-deploy-ethers not compatible with hardhat-toolbox when using npm #27

Closed
jiaochangyang opened this issue Jul 22, 2022 · 8 comments

Comments

@jiaochangyang
Copy link

Hi,

I am unable to install hardhat-deploy-ethers when I have hardhat-toolbox in my dependencies. My package.json dependencies look like:

"devDependencies": {
        "@nomicfoundation/hardhat-toolbox": "^1.0.2",
        "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@^0.3.0-beta.13",
        "ethers": "^5.5.4",
        "hardhat": "^2.10.1",
        "hardhat-deploy": "^0.11.11"
}

I've tested with npm v.8.11.0 (which is bundled with Node 16LTS) as well as the latest v8.15.0. The error received is:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @nomicfoundation/[email protected]
npm ERR! Found: @nomiclabs/[email protected]
npm ERR! node_modules/@nomiclabs/hardhat-ethers
npm ERR!   dev @nomiclabs/hardhat-ethers@"npm:hardhat-deploy-ethers@^0.3.0-beta.13" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @nomiclabs/hardhat-ethers@"^2.0.0" from @nomicfoundation/[email protected]
npm ERR! node_modules/@nomicfoundation/hardhat-chai-matchers
npm ERR!   peer @nomicfoundation/hardhat-chai-matchers@"^1.0.0" from @nomicfoundation/[email protected]
npm ERR!   node_modules/@nomicfoundation/hardhat-toolbox
npm ERR!     dev @nomicfoundation/hardhat-toolbox@"^1.0.2" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @nomiclabs/[email protected]
npm ERR! node_modules/@nomiclabs/hardhat-ethers
npm ERR!   peer @nomiclabs/hardhat-ethers@"^2.0.0" from @nomicfoundation/[email protected]
npm ERR!   node_modules/@nomicfoundation/hardhat-chai-matchers
npm ERR!     peer @nomicfoundation/hardhat-chai-matchers@"^1.0.0" from @nomicfoundation/[email protected]
npm ERR!     node_modules/@nomicfoundation/hardhat-toolbox
npm ERR!       dev @nomicfoundation/hardhat-toolbox@"^1.0.2" 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.

I could technically fix it by forcing the dependencies or using legacy-peer-deps but thought it might be good to raise this issue.

@wottpal
Copy link

wottpal commented Aug 15, 2022

@wighawag i guess that's the same issue i also have with #28

@wighawag
Copy link
Owner

@wottpal yes most likely, The blocker is on hardhat repo : NomicFoundation/hardhat#1040

@wottpal
Copy link

wottpal commented Aug 15, 2022

Ok, but definitely thanks for the quick follow-up here. It's nice to know that you are on it :)

@KirchZ
Copy link

KirchZ commented Sep 12, 2022

Hi! Is there any workaround while the 1040 issue is fixed?

@wottpal
Copy link

wottpal commented Dec 4, 2022

@wighawag any updates on this? can we help?

@wighawag
Copy link
Owner

wighawag commented Dec 4, 2022

Hey @wottpal Franco has made a PR to finally fix the issue but I did not get yet the time to look at it : #30

@wottpal
Copy link

wottpal commented Dec 4, 2022

Really nice. Had a look, but unfortunately it's really only the function interfaces that seem to be in the PR yet.

@wighawag
Copy link
Owner

hardhat-deploy-ethers@next has been released
Please, try it out.

It is now an extension to hardhat-ethers so you need both

But note that that new version do not support external artifact if you were using them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants