How to specify cache folder in npm5 on install command?

谁都会走 提交于 2020-01-20 08:45:12

问题


In yarn it's possible using yarn --cache-folder [CACHE_FOLDER], what is npm5 alternative?

It's possible to set it with separate command npm config set cache [CACHE_FOLDER], but I'm curious if it's possible to do with just passing some argument to npm install

I've checked v5.0.1 release notes and npm install docs but can't find anything about setting cache folder


回答1:


As answered by @maybekatz (npm engineer) on twitter it's possible using --cache argument:

npm install --cache [CACHE_FOLDER]


来源:https://stackoverflow.com/questions/44310188/how-to-specify-cache-folder-in-npm5-on-install-command

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