npm Config, Auth & Cache/Add package tarball to cache

Fetch a package into the local cache.

Section: Cache management

Add package tarball to cache

bash
bash
npm cache add <package>
Explanation

Fetch a package into the local cache.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Cache management
Verify cache
Validate the integrity of the npm cache.
OpenIn sheetbashsame section
Clean cache
Remove cached data. Force is required.
OpenIn sheetbashsame section
List config values
Display effective npm configuration.
OpenIn sheetbash1 tag match
List auth tokens
Show tokens for the current account.
OpenIn sheetbash1 tag match
Show global prefix
Print the global installation prefix.
OpenIn sheetbash1 tag match
List all config defaults
Display defaults and computed values.
OpenIn sheetbash1 tag match