Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
371 views
Welcome To Ask or Share your Answers For Others

1 Answer

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

npm install --cache [CACHE_FOLDER]

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...