[Bug?]: Aliased installs with node_modules are many times larger than the unaliased versions #3951
Labels
bug
Something isn't working
stale
Issues that didn't get attention
waiting for feedback
Will autoclose in a while unless more data are provided
Self-service
Describe the bug
On an attempted upgrade to
3.2.0-rc.10
in a large monorepo, our node_modules size went from ~1.8G to ~2.4G. The most obvious examples of installs that increased in size were aliased ones - the most extreme case I've seen is [email protected], from 2.3M -> 260M.There is a large "self reference" directory (
node_modules/webpack4/node_modules/webpack
) as the deleted test here would normally test for: https://github.com/yarnpkg/berry/pull/3631/files#diff-ca05954739eec8e45eefa4b801ae3909a5069348db95ca5fb1c7be9ff57cf54aL344 (We must not create self-reference directory 'node_modules/no-deps2/node_modules/no-deps'
). That PR is relevant to us for the issue it fixes, v3.1.1 breaks.To reproduce
Observe large size difference between
webpack
andwebpack4
. This can also be observed with separate installs, which would be more realistic anyway. I'd guess this would work with many/all packages; another one I tried at random wasselenium-webdriver
.Environment
System: OS: macOS 11.6.2 CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz Binaries: Node: 12.22.8 - /path/to/node Yarn: 3.2.0-rc.10 - /path/to/yarn npm: 6.14.15 - ~/.nvm/versions/node/v12.22.8/bin/npm
Additional context
No response
The text was updated successfully, but these errors were encountered: