How do I set a custom cache path for Yarn?

廉价感情. 提交于 2019-12-07 00:02:23

问题


I just installed Yarn and I'm trying to switch from npm.

I tried to set my cache path like this, but it wasn't successful:

yarn --cache-folder /usr/local/Caches/yarn
yarn global --cache-folder /usr/local/Caches/yarn
yarn global cache --cache-folder /usr/local/Caches/yarn
yarn cache --cache-folder /usr/local/Caches/yarn
yarn config set --cache-folder /usr/local/Caches/yarn

Here is the documentation for yarn config.


回答1:


The actual command is:

yarn config set cache-folder /usr/local/Caches/yarn

(Note: no preceeding --)

The docs for yarn cache show the various ways this can be set.



来源:https://stackoverflow.com/questions/40381112/how-do-i-set-a-custom-cache-path-for-yarn

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!