-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Extra .npm directory created in user's home while npm_config_cache set #3350
Comments
I wish you'd ask reporters if an issue is still valid before closing, locking it, and requesting that a new one is opened. It's a waste of everyone's time for someone to copy-paste the issue from the old ticket (#1305) to a new one. Sadly, GitHub strips markdown when copy-pasting. See #1305 for a formatted version. |
Closing since the largest discussion already took place in npm/rfcs#389 |
@ruyadorno npm/rfcs#389 is a feature request for npm to respect standard file locations. This issue is a bug where setting |
Sorry, my bad! @nlf this sounds like a potential cacache issue 🤔 |
I've set |
Is there an existing issue for this?
Current Behavior
A ~/.npm directory gets created on npm install along with the correct directory specified in npm_config_cache. On a fresh install without a cache created yet, the size of the extra ~/.npm directory is 2.1 MiB and the size of the specified ~/.cache/npm directory is 89.1 MiB.
Expected Behavior
Obey the npm_config_cache without creating the extra directory in home.
Steps To Reproduce
npm install a package while having npm_config_cache set to a location other than default. The extra directory is created at the end of install.
Environment
Originally:
Arch Linux
node v14.2.0
npm 6.14.5
Ongoing:
Arch Linux
node v16.2.0
npm 7.15.1
The text was updated successfully, but these errors were encountered: