-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
I've been affected by a number of incorrect ERESOLVE
errors related to peer dependencies, forcing me to resort to --force
or --legacy-peer-deps
in order to get npm install
to run. Peer dependency resolution seems to be one of the buggiest parts of npm, even after @owlstronaut's excellent work on fixing peer flag propagation (#8579).
To try to address this, I've gathered several individual ERESOLVE
bug reports and used Claude Sonnet 4.5 to replicate each one and create a patch:
Bug | Patch |
---|---|
#8059 | #8615 |
#8416 | #8623 |
#8258 | #8632 |
#8492 | #8644 |
Unfortunately, there's no overlap between these patches, apart from all of them applying to build-ideal-tree.js
. That suggests to me that there's a more fundamental problem with how peer dependencies fit in to npm's ideal tree algorithm. (Some of the patches may be strict improvements on their own merits, but I'm not confident in that, so I've only submitted them as draft PRs.)
I think this would be a valuable problem for an intrepid developer to dig into. I'll continue to update this ticket with any information I discover.