-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[turborepo] Workspace packages not found if located behind symlink #2517
Comments
Hi @blorgon1, could you provide a reproduction repo? Module resolution is a responsibility of the package manager so it's odd that |
Hi @chris-olszewski, thanks for your response. Here is a reproduction repo: https://github.com/blorgon1/turbo-symlink-repro |
Thanks for the repro! It looks like our globbing library isn't following symlinks. I should be able to get a fix up soon. |
@chris-olszewski This was an intentional change introduced in 494b894 We need to make sure that we don't regress #1265. |
Ah okay, that's unfortunate given that using a folder for submodules is a common practice. From the fix commit message:
It seems that an alternate solution would be to skip copying symlinks but still traverse them? Anyways it's easy to work around, thanks for looking into it! |
I'm having almost the same issue, but in my case it's caused by the symlink that npm creates to connect workspace dependencies. Do we need to manually copy and workspace dependencies to the output image in our dockerfile? This seems like the kind of default behavior that turbo repo should handle. |
This is causing lots of issues for us :( I understand the reason for disabling symlinks but please at least give us an option to enable them again if we have a need to. |
@chris-olszewski is this still happening? :) |
Also experienced some issues regarding symlinks :( |
What version of Turborepo are you using?
1.6.2
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Linux
Describe the Bug
When the path to a workspace package contains a symlink, turborepo can't find the package. I am using submodules for some of my workspace packages, and would like to keep all submodules in the same directory, while still linking them into the desired locations.
My repo is set up like this:
With a
pnpm-workspace.yaml
like this:Then when building
app-a
, this error is encountered:Without using the symlink (placing the submodule in the widgets directory), the build passes as expected.
This behaviour differs from pnpm, as pnpm is still able to locate the workspace packages behind a symlink:
Expected Behavior
Packages should be found when they are located behind symlinks. The behaviour should be identical to when the package is in place of the symlink.
To Reproduce
Move a workspace package to a different location (within the same project folder, just not in a workspace package path), and place a symlink to it in the original location.
Reproduction Repo
https://github.com/blorgon1/turbo-symlink-repro
The text was updated successfully, but these errors were encountered: