Skip to content
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

设置修改 npm yarn 全局/缓存目录路径 #35

Open
yeojongki opened this issue Jun 28, 2023 · 0 comments
Open

设置修改 npm yarn 全局/缓存目录路径 #35

yeojongki opened this issue Jun 28, 2023 · 0 comments
Labels

Comments

@yeojongki
Copy link
Owner

背景

最近发现公司电脑的 C 盘空间快爆满了,查询了一番发现是 npmyarn 的缓存文件太多了,大约有 16G,于是便调整他们的缓存目录

相关命令

查询 npm 全局目录

npm root -g

查询 npm 缓存目录

npm config get cache

设置 npm 缓存目录

npm config set cache "your path"

查询 yarn 全局目录

yarn global dir

查询 yarn 缓存目录

yarn cache dir

设置 yarn 缓存位置

yarn config set cache-folder "your path"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant