Yarn create-no-modify network wide global cache #6358
Replies: 2 comments
-
Can you explain what you did and how it didn't work? The offline mirror is supposed to be checked-in, that's why it's inside your project; if you instead wish to persist the cache itself (ie the global "mirror"), you can configure its location via YARN_GLOBAL_FOLDER |
Beta Was this translation helpful? Give feedback.
-
Would make the git repo too large
You can't make all of YARN_GLOBAL_FOLDER create no modify; this can be done only for the cache. I finally worked out why setting YARN_CACHE_FOLDER did nothing: global is cache is the default. |
Beta Was this translation helpful? Give feedback.
-
On yarn classic we have been using yarn offline mirror since forever; this is the killer feature that led to the adoption of yarn over npm. The cache is create-no-modify.
We're trying to upgrade yarn to latest to deal with some package dependency issues in yarn 1; however this is not going well. Trying to get the network wide global storage back is not working; I can't point just the cache at it.
Setting the environment variable YARN_CACHE_FOLDER doesn't seem to do anything; the user profile wide store is used anyway. Ultimately the goal is so set the cache to the network wide folder so that packages work for us even when they're gone off the servers.
You remember the leftpad catastrophe? We do. We have about a gb of dependencies; the risk of one disappearing is rather too high. This project must live for decades; and committing all the packages into the git repo is not feasible.
Beta Was this translation helpful? Give feedback.
All reactions