Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify cache folder in npm5 on install command?

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

like image 572
Phil Rukin Avatar asked Sep 01 '25 10:09

Phil Rukin


1 Answers

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

npm install --cache [CACHE_FOLDER]
like image 186
Phil Rukin Avatar answered Sep 04 '25 06:09

Phil Rukin