-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Size of node_modules bigger with Yarn compared to NPM #2088
Comments
Once I have created the #2090 issue regarding .npmignore I went and tried to remove any modules that are installed from repository. Apparently it's not a source of problem, here are the results:
And here is modified package.json for a reference. |
Ok, I have pinpointed single module
Edit: Fun fact, NPM adds a lot of information to package.json of installed packages. Yet it still wins in size big time :) |
Ok I think I have found main culprit, |
I got 544 MB just for babel and it's followers for this package.json. Compared to npm, which just 135M just for babel and babel-*, I think it's too big. here's npm:
yarn:
yarn got almost four times bigger than npm. |
This is (literally) a really big issue, and a the main thing keeping us from switching over to Yarn for the moment. We're trying to keep folder sizes to a minimum with various docker-integrations, so at the moment it looks like Yarn would multiply our build and test times. |
this package.json This is already a problem, but it gets better: NPM install bundled with this webpack Yarn install bundled with same webpack: also, straigthforward things like Basically i can't update to NPM 5 because of the bugs it has and i can't just use Yarn because it bloats my application (??) and makes everything stop working (???) Come on... |
I also confirm this, yarn node_modules folder is up to 1.5 times bigger than npm one:
There is a time benchmark:
|
I don’t think this is an issue anymore, at least with Yarn 1.17.3. In fact, using the macOS 10.14.5
|
Closing this. If this is is still an issue on 1.21.1, please comment and I'll reopen. |
Do you want to request a feature or report a bug?
More likely feature, but might be hidden bug as well
What is the current behavior?
Installing this package.json yields these results:
If the current behavior is a bug, please provide the steps to reproduce.
Everything is in the gist. Also I have zipped both installed folders to ensure you can see what I see.
What is the expected behavior?
Difference is not that big here yet, but I had to strip that package.json of some private modules, but has certainly growing nature. In all cases everything is working as it supposed to.
Please mention your node.js, yarn and operating system version.
Node 6.9.1, Yarn 0.17.7, Windows 10 x64
The text was updated successfully, but these errors were encountered: