-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[BUG] ERESOLVE peer dep conflict reported when no conflict exists #3138
Comments
@ljharb can you reproduce on latest? (ie. |
@darcyclarke yes, i can reproduce it on latest npm: code ERESOLVE
ERESOLVE unable to resolve dependency tree
Found: [email protected]
node_modules/eslint-plugin-eslint-plugin
dev eslint-plugin-eslint-plugin@"3" from the root project
Could not resolve dependency:
dev eslint-plugin-eslint-plugin@"3" from the root project
Conflicting peer dependency: [email protected]
node_modules/eslint
peer eslint@"^7.0.0" from [email protected]
node_modules/eslint-plugin-eslint-plugin
dev eslint-plugin-eslint-plugin@"3" from the root project `eresolve-report.txt`:# npm resolution error report
2021-06-12T07:00:59.767Z
Found: [email protected]
node_modules/eslint-plugin-eslint-plugin
dev eslint-plugin-eslint-plugin@"3" from the root project
Could not resolve dependency:
dev eslint-plugin-eslint-plugin@"3" from the root project
Conflicting peer dependency: [email protected]
node_modules/eslint
peer eslint@"^7.0.0" from [email protected]
node_modules/eslint-plugin-eslint-plugin
dev eslint-plugin-eslint-plugin@"3" from the root project
Fix the upstream dependency conflict, or retry
this command with --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
Raw JSON explanation object:
{
"code": "ERESOLVE",
"current": {
"name": "eslint-plugin-eslint-plugin",
"version": "2.3.0",
"location": "node_modules/eslint-plugin-eslint-plugin",
"isWorkspace": false,
"dependents": [
{
"type": "dev",
"name": "eslint-plugin-eslint-plugin",
"spec": "3",
"error": "INVALID",
"from": {
"location": "$PWD"
}
}
]
},
"currentEdge": null,
"edge": {
"type": "dev",
"name": "eslint-plugin-eslint-plugin",
"spec": "3",
"error": "INVALID",
"from": {
"location": "$PWD"
}
},
"peerConflict": {
"name": "eslint",
"version": "7.28.0",
"whileInstalling": {
"name": "eslint-plugin-react",
"version": "7.24.0",
"path": "$PWD"
},
"location": "node_modules/eslint",
"isWorkspace": false,
"dependents": [
{
"type": "peer",
"name": "eslint",
"spec": "^7.0.0",
"from": {
"name": "eslint-plugin-eslint-plugin",
"version": "3.0.3",
"whileInstalling": {
"name": "eslint-plugin-react",
"version": "7.24.0",
"path": "$PWD"
},
"location": "node_modules/eslint-plugin-eslint-plugin",
"isWorkspace": false,
"dependents": [
{
"type": "dev",
"name": "eslint-plugin-eslint-plugin",
"spec": "3",
"from": {
"location": "$PWD"
}
}
]
}
}
]
},
"strictPeerDeps": false,
"force": false
} |
This is a reporting error.
You're trying to use So the I'm in the midst of upgrading the cli to @npmcli/[email protected], and the report got even more broken. 😅 So I'm going to dig into that now. |
Ok, the error was easy to work around. Caused by the ERESOLVE explanations getting a bit more useful in arborist 2.8, ironically enough, but no longer squishing a direct conflict in with the extended peerDep conflict, which was losing some information. Fixed report looks like this, and I'm going to call this a by-design crash, with a reporting error that'll be fixed on the next release:
|
I see the conflict, thanks. |
Current Behavior:
in
eslint-plugin-react
's repo, on master, i rannpx npm@7 install --save-dev @types/eslint @types/node eslint-plugin-eslint-plugin@3 semver sinon typescript typescript-eslint-parser
.I got https://gist.github.com/ljharb/dc643e6f094d5dfc912633a5e55637ab as output. Note:
Expected Behavior:
It should have installed and saved these dev deps.
^7.0.0
is compatible withv7.24.0
.Steps To Reproduce:
Clone the repo, run
npm install
, then run the above command.Environment:
(this does _ not_ appear to be the same issue as #3113 or #2823)
The text was updated successfully, but these errors were encountered: