-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
Yarn cache caused impossible total size #13
Comments
omg it seems that npkill found a quantum link! Thank you for opening this issue. We will investigate the origin of this calculation failure (I suspect that it may be a problem of rounding figures as there are so many directories).
|
The 2 GB seems correct and it finds the same amount each time I run it. Another thing I forgot to mention is that I ran it twice before doing Unfortunately I did not check the real size of the Yarn cache before cleaning it. |
Before
After
The size of yarn cache:
@zaldih I believe this is indeed because of the rounding issue. Almost all of the folders were reported as having
|
Yess! Is a problem fo rounding. However, linux service uses the du command with some parameter that rounds at least 1mb, although a directory only occupies 0.01mb
A possible solution would be to investigate how to get the size in bytes with that command, and convert them to mb in the same way as windows service does. This seems like a simple bug for anyone who would like to contribute to the repo for the first time. 😃 Does anyone take it? |
I'll fix it :D |
The problem should now be fixed in #18 🎉 |
Issue should be fixed from version 4.0.0 onwards |
Got this today :) Yarn cache was around 300MB, |
@maxdevjs We realized that by merging #74, the bug reappeared. I'm working on a solution on this branch. However, my solution would only fix the bug on Linux, not MacOS. This is because the du parameter that fixes the bug (--apparent-size) has no equivalent in MacOS (as far as I know). I'm researching for a way to fix it in MacOS, but so far I haven't found anything. If anyone has any ideas, I'd love to try them out :) |
@NyaGarcia thank you for the reply. I quickly checked #74 and the suggested branch, I guess the solution you are working on is
right? That said, my bad! Just to be clear, I tried it on Linux. This changes the focus of my question: currently happens on both Linux and MacOS? |
On MacOS, I ran it in my home directory and it said 600 GB. My laptop only has a 512 GB SSD.
There were many
node_modules
folders in my Yarn cache.After running
yarn cache clean
, npkill said ~2 GB.The text was updated successfully, but these errors were encountered: