cache configuration details hard to find

cli

(cowchimp) #1

I saw someone using npm ci --cache ~/some-dir in a build script.
I couldn’t find any explanation of this --cache flag in https://docs.npmjs.com/all or in npm help install.
I guess it defines the location of the NPM cache but I’m still not clear on (a) what is the default value (b) what does it do if there’s a cache-miss, etc.
I’m using NPM 5.8.

Thank you!


(Kat Marchán) #2

The cache is documented here:

https://docs.npmjs.com/cli/cache

Which is also accessible through $ npm help cache.

For future reference, the entire list of config flags for npm lives here:

https://docs.npmjs.com/misc/config

Available through $ npm help 7 config

It -would- be nice if we documented prefer-offline, prefer-online and offline in a more findable way, so I would love a patch for that if you’re interested! Some mention of the cache option in $ npm help install seems like a good idea.

So I’m moving this to #support:docs-needed!


(system) #3

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.