.yarn cache and pnpm? #5792
-
Hey all, For some context: Unfortunately, yarn pnp is not working from a development speed aspect. The opacity of the zip files and additional hoops for IDE support or even tooling make education and debugging a large tax to a growing development team. I did run across the pnpm nodeLinker as a good compromise though. The Question: Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Yarn stores all fetched packages in a global cache. So in a day-to-day development usecase, each developer should incur the network bottleneck only once. In a CI usecase, using caching provided by the CI platform is probably more efficient, but there seem to be no consensus on how to best cache Yarn Modern on CI at the moment. The main benefit of committing |
Beta Was this translation helpful? Give feedback.
In that case, yes, you will need to run
yarn install
to run the postinstall scripts anyway.Your use case sounds reasonable enough to me, though I still think CI cache is a better solution.
I assume your repo lives in a private environment (where only trusted developers can submit PRs). Otherwise, you would be vulnerable to cache and lockfile poisoning attacks. In such an untrusted environment, it is recommended to check the cached zips and lockfile against the registry anyway, negating any saving made.