-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
configuring cache dir #2181
Comments
I notice there is a By the way, |
Running into this myself just now, |
Slightly related but is it possible to configure the cache dir as a command flag during the installation process? e.g.: This is useful in some CI environments where you can't write outside of the project's folder. After some investigation, I've noticed that --cache-folder is the correct flag, but since Yarn still tries to write the .config folder outside of the project directory, it will always fail in my use cases. |
@Couto you can work around .config location by simply overwriting the $HOME env variable before running yarn e.g.: |
Using
None of them work. Also https://yarnpkg.com/lang/en/docs/cli/cache/#toc-change-the-cache-path-for-yarn does not work. Same goes for global folder but |
wakeful's solution didn't work inside a
This will set an absolute path in a global config, but it should be fine for CI configs (our use case). |
The absolute path seems to do the job of actually setting this config value to what you might want to use.
|
We use the |
Is that really |
Should be |
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
yarn
currently save cached packages in a default directory:/Users/<user>/Library/Caches/yarn
orC:/Users/<user>/AppData/Local/Yarn/cache
.When a lot of packages are cached, each user on the system to consume a lot of space on the primary drive.
I would like to config yarn to save cache packages in a backup drive which has a lot more space, and may cache packages from all users in the same location (as discussed in #2125)
What is the expected behavior?
yarn config set cache-dir <location>
Please mention your node.js, yarn and operating system version.
yarn: 0.17.6
The text was updated successfully, but these errors were encountered: