Yarn 4: Respect enableTransparentWorkspaces: false
when resolving workspace dependencies
#8989
Open
1 task done
Labels
Verify canary release
Link to code that reproduces this issue
https://github.com/me4502/turborepo-reproduction
What package manager are you using / does the bug impact?
Yarn v2/v3/v4 (node_modules linker only)
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
2.0.12-canary.3
Describe the Bug
When a dependency using Yarn's
npm:
protocol exists that has the same name as a workspace in the repo, turborepo incorrectly builds the repo with that name. This causes issues in cases where FFI-requiring packages are built on CI and used purely via NPM rather than local workspaces.Expected Behavior
As these dependencies come from npm, and not the workspace of the same name, the workspace should not be built nor considered part of turborepo's dependency graph.
To Reproduce
yarn
in the root of the repocd
toworkspaces/a
yarn build:turbo
As can be seen in the output, the buffer workspace's
build
script has been incorrectly run, despite it not being a dependency of thea
workspace.Additional context
The important parts of this setup are that there's a package called
buffer
being used by workspacea
, and a workspace also namedbuffer
. The repro is setup to specifically use the dependency from npm, so it should not be building the workspace copy as it's redundant (and in the case of FFI dependencies, potentially impossible from local development machines).The text was updated successfully, but these errors were encountered: