yarn和npm一样,默认安装的全局包和缓存都在C盘里:npm的cache默认在:C:\Users\用户\AppData\Roaming\npmyarn的cache默认在:C:\Users\用户\AppData\Local\Yarn
yarn config set global-folder "新缓存路径" yarn config set cache-folder "新缓存路径"