Skip to content

[EPIC]: Fix incorrect ERESOLVE errors from peer dependencies #8647

Closed

Description

@TrevorBurnham

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.

Activity

  1. wraithgar commented on Oct 6, 2025

    @wraithgar
    Contributor

    I think this would be a valuable problem for an intrepid developer to dig into.

    These are not very helpful as PRs. Typically when a PR is submitted the work has been done to make it ready to land. If this was something we had the time to dig into we would be doing it ourselves.

    We are happy to work through specifics in a PR that a community member has already worked through and needs some last mile help. A lot of the recent PRs for dep flag calculations are a good example of this. #8645

    I'm going to close those PRs for now. If tests end up passing and you've done the work to make them acceptable then we can go from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions