-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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
- Have a workspace (
@repo-a/root
) in a github repogithub.com/user/repo-a
. - In this workspace, have
@repo-a/package-1
and@repo-a/package-2
. - Have
@repo-a/package-1
depend on@repo-a/package-2
withworkspace:^
. - Have a github repo
github.com/user/repo-b
with a package@repo-b/root
. - At the
@repo-b/root
add a dependency to@repo-a/package-1
as"@repo-a/package-1": "git@github.com:user/repo-a.git#workspace=@repo-a/package-1"
- 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.
shinebayar-g
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working