Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Overriding dep doesn't work with peer deps if there is version mismatch #9913

Copy link
Copy link
@brc-dd

Description

@brc-dd
Issue body actions

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

10.15.0

Which area(s) of pnpm are affected? (leave empty if unsure)

Dependencies resolver

Link to the code that reproduces this issue or a replay of the bug

https://github.com/brc-dd/pnpm-peer-dep-override-bug

Reproduction steps

Clone the repo and run pnpm i.

Describe the Bug

❯ pnpm i
Scope: all 2 workspace projects
/Users/divyansh/foo/foo:
 ERR_PNPM_NO_MATCHING_VERSION  No matching version found for vite@7.1.5 while fetching it from https://registry.npmjs.org/

This error happened while installing a direct dependency of /Users/divyansh/foo/foo

The latest release of vite is "7.1.3".

Other releases are:
  * alpha: 6.0.0-alpha.24
  * previous: 4.5.14
  * beta: 7.1.0-beta.1

If you need the full list of all 668 published versions run "$ pnpm view vite versions".
Progress: resolved 67, reused 45, downloaded 0, added 0

In this case rolldown-vite has v7.1.5 but vite has latest v7.1.3. foo/package.json has @vitejs/plugin-vue which has a peer dependency on vite. pnpm tries to install vite@7.1.5 instead of respecting override and installing vite@npm:rolldown-vite@7.1.5.

Expected Behavior

Install works fine. It works fine on v10.14.0. I think #9835 broke this?

Which Node.js version are you using?

24.3.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.