hardhat-ethernal
hardhat-ethernal copied to clipboard
0.8.1 install error: Could not resolve dependency @nomiclabs/hardhat-ethers@"npm:hardhat-deploy-ethers@^0.3.0-beta.10"
Console log:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: hardhat-project@undefined
npm ERR! Found: @nomiclabs/[email protected]
npm ERR! node_modules/@nomiclabs/hardhat-ethers
npm ERR! dev @nomiclabs/hardhat-ethers@"^2.0.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @nomiclabs/hardhat-ethers@"npm:hardhat-deploy-ethers@^0.3.0-beta.10" from [email protected]
npm ERR! node_modules/hardhat-ethernal
npm ERR! dev hardhat-ethernal@"^0.8.1" 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.
package.json:
{
"name": "hardhat-project",
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.5",
"@nomiclabs/hardhat-waffle": "^2.0.3",
"chai": "^4.3.6",
"dotenv": "^16.0.0",
"ethereum-waffle": "^3.4.0",
"ethers": "^5.5.4",
"hardhat": "^2.9.0",
"hardhat-contract-sizer": "^2.5.0",
"hardhat-gas-reporter": "^1.0.8",
"hardhat-ethernal": "^0.8.1"
},
"dependencies": {
"@openzeppelin/contracts": "^4.5.0"
}
}
Are you using npm or yarn?
If npm, can you run npm install --force
?
We have the same problem and I wanted to ask you why are using a "beta" as dependecy for Ethernal instead of the stable 2.0.5
Because of how Hardhat plugins work, Ethernal has to use the ethers version that is included in hardhat-deploy-ethers. The "beta" version is the version of hardhat-deploy-ethers, which uses and exports ethers v2.0.5.
Console log:
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: hardhat-project@undefined npm ERR! Found: @nomiclabs/[email protected] npm ERR! node_modules/@nomiclabs/hardhat-ethers npm ERR! dev @nomiclabs/hardhat-ethers@"^2.0.5" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @nomiclabs/hardhat-ethers@"npm:hardhat-deploy-ethers@^0.3.0-beta.10" from [email protected] npm ERR! node_modules/hardhat-ethernal npm ERR! dev hardhat-ethernal@"^0.8.1" 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.
package.json:
{ "name": "hardhat-project", "devDependencies": { "@nomiclabs/hardhat-ethers": "^2.0.5", "@nomiclabs/hardhat-waffle": "^2.0.3", "chai": "^4.3.6", "dotenv": "^16.0.0", "ethereum-waffle": "^3.4.0", "ethers": "^5.5.4", "hardhat": "^2.9.0", "hardhat-contract-sizer": "^2.5.0", "hardhat-gas-reporter": "^1.0.8", "hardhat-ethernal": "^0.8.1" }, "dependencies": { "@openzeppelin/contracts": "^4.5.0" } }
I faced the same error and I fixed installing: "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@^0.3.0-beta.13". If you are working using Linux (like me), you can get another error (not on MacOS) about keytar. In that case you need to run: sudo apt-get install libsecret-1-dev. Then, if you run npm i (with hardhat-ethernal 0.8.1), it works.
On hardhat-ethernal 0.8.1 we are speaking with Antoine about changing in: hardhat-ethernal/dist/type-extensions.d.ts from
declare module "hardhat/types/config" {
interface HardhatConfig {
disableEthernal?: boolean;
}
}
to
declare module "hardhat/types/config" {
interface HardhatUserConfig {
disableEthernal?: boolean;
}
}
in order to not get static error in hardhat.config.js about disableEthernal
Console log:
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: hardhat-project@undefined npm ERR! Found: @nomiclabs/[email protected] npm ERR! node_modules/@nomiclabs/hardhat-ethers npm ERR! dev @nomiclabs/hardhat-ethers@"^2.0.5" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @nomiclabs/hardhat-ethers@"npm:hardhat-deploy-ethers@^0.3.0-beta.10" from [email protected] npm ERR! node_modules/hardhat-ethernal npm ERR! dev hardhat-ethernal@"^0.8.1" 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.
package.json:
{ "name": "hardhat-project", "devDependencies": { "@nomiclabs/hardhat-ethers": "^2.0.5", "@nomiclabs/hardhat-waffle": "^2.0.3", "chai": "^4.3.6", "dotenv": "^16.0.0", "ethereum-waffle": "^3.4.0", "ethers": "^5.5.4", "hardhat": "^2.9.0", "hardhat-contract-sizer": "^2.5.0", "hardhat-gas-reporter": "^1.0.8", "hardhat-ethernal": "^0.8.1" }, "dependencies": { "@openzeppelin/contracts": "^4.5.0" } }
I faced the same error and I fixed installing: "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@^0.3.0-beta.13". If you are working using Linux (like me), you can get another error (not on MacOS) about keytar. In that case you need to run: sudo apt-get install libsecret-1-dev. Then, if you run npm i (with hardhat-ethernal 0.8.1), it works.
Sorry I'm not sure what is the fix you are mentioning here. Do you mind explaining?
At the moment, the only fix I'm aware of for the dependency issue is to either use yarn or the --force
flag with npm.
I am having the same issue..
and I use --force and --legacy-peer-deps. It works fine. But if I want to install other deps, I got these error:
I need to uninstall hardhat-ethernal, install ohter deps, and try install hardhat-ethernal with --force or --legacy-peer-deps again...
Hi,
I have the same issue with 2.2.0 version of hardhat-ethers and 2.1.0 of hardhat-ethernals. Is there any solution for this, or it's necessary to use it together with --force flag only?
{
"dependencies": {
"@nomicfoundation/hardhat-toolbox": "^2.0.0",
"@nomiclabs/hardhat-ethers": "^2.2.0",
"@openzeppelin/contracts": "^4.7.3",
"hardhat": "^2.12.0",
"hardhat-ethernal": "^2.1.0"
},
"devDependencies": {
"ts-node": "^10.9.1",
"typescript": "^4.8.4"
}
}
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @nomiclabs/[email protected]
npm ERR! node_modules/@nomiclabs/hardhat-ethers
npm ERR! @nomiclabs/hardhat-ethers@"^2.2.0" from the root project
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! @nomicfoundation/hardhat-toolbox@"^2.0.0" from the root project
npm ERR! 1 more (@nomicfoundation/hardhat-toolbox)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @nomiclabs/hardhat-ethers@"npm:hardhat-deploy-ethers@^0.3.0-beta.10" from [email protected]
npm ERR! node_modules/hardhat-ethernal
npm ERR! hardhat-ethernal@"^2.1.0" 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@"npm:hardhat-deploy-ethers@^0.3.0-beta.10" from [email protected]
npm ERR! node_modules/hardhat-ethernal
npm ERR! hardhat-ethernal@"^2.1.0" 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.
Hi,
Yes, at the moment, you have to use the --force flag to install it unfortunately.
thanks for the quick reply. Is there any eta for fixing this?
Not yet, last time I checked, this issue was still coming from a conflict due to how Hardhat handles plugins.
My assumption was that using the --force flag shouldn't be an issue in general. Is there a reason for you to not use it?
I think the issue is that hardhat already using beta.13 and your plugin beta.10. But maybe there is some other issue.
Regarding --force, the issue is that as soon as you use it once, you have to use it always, because it's not possible to call any other next "npm i " command without --force anymore.
I'll take a look at those versions.
I see. And have you tried using yarn instead of npm? I think it works without the force flag
I installed with npm install --legacy-peer-deps
and got it to work. Probably not ideal, but should work until things are resolved.
Same issue with [email protected]
, i dont want to use force
$ npm i -D hardhat-ethernal
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: hardhat-project@undefined
npm ERR! Found: @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@"^2.0.0" from the root project
npm ERR! peer @nomiclabs/hardhat-ethers@"^2.0.0" from @nomicfoundation/[email protected]
npm ERR! node_modules/@nomicfoundation/hardhat-toolbox
npm ERR! dev @nomicfoundation/hardhat-toolbox@"^2.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev hardhat-ethernal@"*" 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@"npm:hardhat-deploy-ethers@^0.3.0-beta.10" from [email protected]
npm ERR! node_modules/hardhat-ethernal
npm ERR! dev hardhat-ethernal@"*" 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 C:\Users\{user}\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\{user}\AppData\Local\npm-cache\_logs\2022-12-05T16_20_25_332Z-debug-0.log
Same issue for me
Same issue with
[email protected]
, i dont want to use force$ npm i -D hardhat-ethernal npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: hardhat-project@undefined npm ERR! Found: @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@"^2.0.0" from the root project npm ERR! peer @nomiclabs/hardhat-ethers@"^2.0.0" from @nomicfoundation/[email protected] npm ERR! node_modules/@nomicfoundation/hardhat-toolbox npm ERR! dev @nomicfoundation/hardhat-toolbox@"^2.0.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! dev hardhat-ethernal@"*" 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@"npm:hardhat-deploy-ethers@^0.3.0-beta.10" from [email protected] npm ERR! node_modules/hardhat-ethernal npm ERR! dev hardhat-ethernal@"*" 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 C:\Users\{user}\AppData\Local\npm-cache\eresolve-report.txt for a full report. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\{user}\AppData\Local\npm-cache\_logs\2022-12-05T16_20_25_332Z-debug-0.log
This works for me
npm install --legacy-peer-deps hardhat-ethernal
Hey, it's been a while on this one - possible to fix so force
or legacy-peer-deps
aren't needed? I see the config typings have made their way into Hardhat, perhaps that's relevant, not 100% sure.
Hey, it's been a while on this one - possible to fix so
force
orlegacy-peer-deps
aren't needed? I see the config typings have made their way into Hardhat, perhaps that's relevant, not 100% sure.
Thanks for the ping! I started to work on it. Packages upgrade seem to be more complex than what I thought though
I've pushed a new version: 3.2.3 that should fix the issue. Please, let me know if that works
Thanks @antoinedc will get back to you
Closing this for now, feel free to comment/reopen if the problem is still here.