[BUG] ERESOLVE unable to resolve dependency tree
with conflicting deep peerDependencies
#2823
Labels
ERESOLVE unable to resolve dependency tree
with conflicting deep peerDependencies
#2823
Current Behavior:
Installing a module with a
peerDependencies
that conflicts with one of its dependencies'peerDependencies
fails. For example,@wojtekmaj/enzyme-adapter-react-17
has apeerDependencies
on React 17. It also depends onenzyme-adapter-utils
, which has apeerDependencies
on React of0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0
(not 17). Attempting to install this module causes anERESOLVE unable to resolve dependency tree
error.Unfortunately, I control neither of these packages, and have zero power to update them. This can be bypassed with
--legacy-peer-deps
, but I distribute an app starter to my user base and I'd like to avoid leaving purposefully legacy things in the generated.npmrc
s come October when this all goes LTS.This isn't isolated to this one instance, I was able to create a minimal reproduction:
https://github.com/10hendersonm/npm-7-peerdeps-repro
Expected Behavior:
Installation succeeds, either with peerDependency warnings OR by placing the conflicting
peerDependencies
into thenode_modules/requesting-module/node_modules/
directory.Steps To Reproduce:
Minimal Reproduction
Steps in README: https://github.com/10hendersonm/npm-7-peerdeps-repro
TL;DR Create a package with
"peerDependencies": { "left-pad": "1.2.*" }
andnpm pack
it. Create a second package with"peerDependencies": { "left-pad": "1.3.*" }
, andnpm i ../your/packed/tarball
.Real-World Example
Environment:
The text was updated successfully, but these errors were encountered: