-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Bug] During link step, attempting to rm nested node_modules
causes errors if node_modules
is a docker volume or similar
#1184
Comments
Try running |
Thanks, I actually was in the midst of trying that just now. I've run
Sorry if I'm missing something obvious. Maybe this is the latest verison? But I see a |
Ok, I was able to set the version like so:
and the original bug of this issue persists when running
|
@milesrichardson Should be fixed via: |
@larixer Wow, quick fix! Thank you :) Unfortunately I've already nuked the docker container where the bug was happening and started fresh, and I'm not sure what the exact trigger of it was, so unable to reproduce at this time. But next time I encounter the error I will test this out. |
@milesrichardson I think it should reproduce every time when you have empty |
@larixer Thanks for the quick update. I found this thread searching for the same problem. I am using this in a Docker file though. How can I know when your branch gets merged in? That is, I currently have it as |
@nnennajohn You can subscribe to updates on the pull request web page, and you will be notified on all the commits, comments and the merge of the pull request. The pull request page is here: |
@larixer Ok. Will do that. I appreciate the quick response. Thank you. |
Fixed via #1185 |
FYI this has started regressing for me again (yarn tries to remove the entire |
@milesrichardson It's hard to tell anything without reproduction, preferably the Sherlock reproduction |
tbh it's unlikely I will get that as the workaround is fine for now. But I will post it if I have it. |
👌 |
@milesrichardson Probably that PR might help which might be landed into 3.x, but I'm not sure of ETA or whether it will be landed the same as it is now: |
I'm trying to switch from yarn1 and I'm running into this error. I have added reproduction steps at https://github.com/ncjones/yarn-nm-volume. I have not found a workaround yet; removing the .yarn-state.yml does not help. |
I can confirm that #3467 does NOT help in this case (node_modules as docker volumes). |
@Taraluktus @ncjones Your issues are unactionable from our side without reproduction. Please open an issue with reproduction. |
Describe the bug
In some cases, when using
nodeLinker: node-modules
, during thelink
step, yarn will attempt to delete the entirenode_modules
directory, instead of only its contents. This causes problems with the common docker pattern of mountingnode_modules
as a volume, resulting in an error like the following:Note in this case,
node_modules
is in a subdirectory of a monorepo.To Reproduce
Sorry, I am unable to provide a minimal reproduction.
Environment if relevant (please complete the following information):
Additional context
I found this issue -- #1108 -- which may have fixed it. So I tried upgrading yarn using the following command:
But it still seems to be on
2.0.0-rc.30
after running it. As far as I can tell from the releases page, this version does not include the fix linked above, so I am unable to confirm the fix works as I am unable to upgrade to a version including it.Maybe this is as simple as upgrading yarn. I've searched the docs and am unclear on the best way to do this, could you please advise if so?
The text was updated successfully, but these errors were encountered: