-
Couldn't load subscription status.
- Fork 3.8k
Closed
Labels
Bugthing that needs fixingthing that needs fixing
Description
What / Why
npm keeps creating its cache directory in my $HOME. I keep very few directories in my $HOME to keep things findable, and its very annoying when apps start littering stuff there.
When
Any time I run things like npm install blah.
Where
$ uname -srmo
Linux 5.7.2-arch1-1 x86_64 GNU/LinuxHow
Current Behavior
A directory is creted in $HOME and cache data stored in there.
Steps to Reproduce
- Run
rm -rf .cacheto delete your existing cache. - Navigate to a directory with an existing
package.json. - Run
npm install.
Expected Behavior
The cache directory should be in $XDG_CACHE_HOME on Linux. Specifically, it should be $XDG_CACHE_HOME/npm. $XDG_CACHE_HOME should default to .cache if undefined.
I believe on macOS there's a different spec for default locations, and things like cache are stored in a different place. I don't know the name of the spec so can't easily link in here.
Who
- n/a
References
astier, BachoSeven, joshas, gaving, brendanzab and 15 more
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixing