Skip to content

[Bug?]: inter-workspace dependencies are not properly resolved when installing a package from git #6732

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

Open
1 task
MOZGIII opened this issue Mar 20, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@MOZGIII
Copy link

MOZGIII commented Mar 20, 2025

Self-service

  • I'd be willing to implement a fix

Describe the bug

Yarn doesn't look for the workspace dependency of a dependency installed from git in that workspace, and tries to look for it at the registry instead.

To reproduce

  1. Have a workspace (@repo-a/root) in a github repo github.com/user/repo-a.
  2. In this workspace, have @repo-a/package-1 and @repo-a/package-2.
  3. Have @repo-a/package-1 depend on @repo-a/package-2 with workspace:^.
  4. Have a github repo github.com/user/repo-b with a package @repo-b/root.
  5. At the @repo-b/root add a dependency to @repo-a/package-1 as "@repo-a/package-1": "[email protected]:user/repo-a.git#workspace=@repo-a/package-1"
  6. Observe yarn install fail to resolve @repo-a/package-2 and fail the install @repo-a/package-1 because of it.

Environment

  System:
    OS: macOS 15.1.1
    CPU: (8) arm64 Apple M1
  Binaries:
    Node: 22.13.0 - /private/var/folders/cn/860vwq3j5zv_7_vzbtdfq9h40000gn/T/xfs-4e1f5446/node
    Yarn: 3.8.7 - /private/var/folders/cn/860vwq3j5zv_7_vzbtdfq9h40000gn/T/xfs-4e1f5446/yarn
    npm: 10.9.2 - /opt/homebrew/opt/node@22/bin/npm
    bun: 1.1.8 - ~/.bun/bin/bun

Additional context

This was brought up before but was closed without a solution due to being stale - #4545. The problem still exists and didn't go away.

@MOZGIII MOZGIII added the bug Something isn't working label Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant