Comments (10)
Before yarn cache clean
:
releasable space: 377791.00 mb
After yarn cache clean
:
releasable space: 4207.00 mb
The size of yarn cache:
5.6G Yarn
@zaldih I believe this is indeed because of the rounding issue. Almost all of the folders were reported as having 1 mb
. An excerpt:
/Users/matyas/Library/Caches/Yarn/v4/npm-array-find-index-1.0.2-df010aa1287e164bbda6f9723b0a96a1ec4187a1/node_modules 1 mb
/Users/matyas/Library/Caches/Yarn/v4/npm-pretty-error-2.1.1-5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3/node_modules 1 mb
/Users/matyas/Library/Caches/Yarn/v4/npm-query-string-6.8.1-62c54a7ef37d01b538c8fd56f95740c81d438a26/node_modules 1 mb
/Users/matyas/Library/Caches/Yarn/v4/npm-filesize-3.6.1-090bb3ee01b6f801a8a8be99d31710b3422bb317/node_modules 1 mb
/Users/m...ary/Caches/Yarn/v4/npm-character-entities-legacy-1.1.3-3c729991d9293da0ede6dddcaf1f2ce1009ee8b4/node_modules 1 mb
/Users/m...brary/Caches/Yarn/v4/npm-eslint-plugin-flowtype-2.50.3-61379d6dce1d010370acd6681740fd913d68175f/node_modules 1 mb
/Users/matyas/Library/Caches/Yarn/v4/npm-diff-sequences-24.3.0-0f20e8a1df1abddaf4d9c226680952e64118b975/node_modules 1 mb
from npkill.
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).
- Do you know how much space the cache really occupied?
- Those ~ 2GB that shows npkill correspond to the actual size or is it also wrong?
from npkill.
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 yarn cache clean
and it gave different results. The first time, it was about 570 gb and the second time it was over 600.
Unfortunately I did not check the real size of the Yarn cache before cleaning it.
from npkill.
Yess! Is a problem fo rounding.
I have been able to verify that in windows this does not happen because its service has more precision.
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?
from npkill.
I'll fix it :D
from npkill.
The problem should now be fixed in #18 π
In the next update this fix will be included
from npkill.
Issue should be fixed from version 4.0.0 onwards
from npkill.
Got this today :)
Yarn cache was around 300MB, npkill
returned around 260GB π€
from npkill.
@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 :)
from npkill.
@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?
from npkill.
Related Issues (20)
- [Feature request]: Open the folder
- Better way to distribute the binary? (windows-find.exe) HOT 3
- Use of mutation testing in npkill - Help needed HOT 1
- Can you stop at the high level node_modules? HOT 2
- Getting SyntaxError: Unexpected token '.' during npkill launch HOT 3
- Freezes calculating stats HOT 13
- Moving back to an item that has started deleting, or is deleted, disables the arrow key and produces error HOT 3
- Invalid count value HOT 6
- Thank you for this amazing package
- TypeError: Cannot read properties of undefined (reading 'message') HOT 1
- Help command does not print all the result in the large-size window HOT 1
- Node.js v18.16.0οΌThere is a type error at line 262 of the controller file controller.js, the line of code tries to access error.message, but the error variable is undefined, causing the program to crash HOT 3
- npkill does NOT show `node_module`s in the nested projects. HOT 6
- Errors on symlinked node_modules HOT 1
- Does not show any node_modules HOT 1
- delete is too slow HOT 2
- Support for `--target` with multiple directories
- gar dependency is deprecated HOT 1
- feature to be able to remove the project entirely
- Enable '--delete-all' feature plz HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npkill.