-
-
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?]: .pnp.cjs needs different packageLocation
values on different machines
#6202
Comments
After some investigation, it seems like the issue is related to where machine A and B have cloned the repo to. Machine A's enlistment is located at |
A current limitation is that the relative path between the project and the global cache must be the same between machines when using We use relative paths for better portability since absolute paths would likely be always broken, and the |
Yeah, I see that now. I agree then that this isn't a bug and the behavior makes sense. I think the documentation should be more clear that zero installs require the global cache to be disabled, the only mention of it I can find is on this page, which requires reading a lot of context (skipping directly to the "Zero Installs" section means you miss essential information). It's not mentioned in more visible places(1) people are likely to find(2), with that second page being what people see when they click on the "zero installs" reference on the FAQ page. |
Hi! 👋 It seems like this issue as been marked as probably resolved, or missing important information blocking its progression. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it. |
Thanks to all who helped resolved this. The bug would be that the tooling for doing an ugprade from Yarn 3 to Yarn 4 ( Ideally the automatic upgrade would detect zero install and add this to the |
Self-service
Describe the bug
Our project uses Yarn with zero installs. Everything more or less works. However, the
.pnp.cjs
file is different on my machine compared to another, which means one of us will always have to runyarn
/yarn install
to get the project to actually run (and that of course generates a change which Git would like to check in).Here's an example of a package we use (Vite) that's different:
Machine A:
Machine B:
As you can see, there's an extra
..
.The other type of change involves the location of virtual packages:
A:
B:
In this case they're identical except one is in
/3/
and the other is in/4/
.This isn't a huge deal, we can just add
.pnp.cjs
to the gitignore and get used to runningyarn install
more often. But the docs say we should be checking this file in so I'd rather not do that.To reproduce
This is difficult to provide a repro for, since I assume it's coming from something in one of our environments. It affects every single package we have installed.
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: