-
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
using symbolic links inside node_modules #1064
Comments
I believe that Big danger here, what if dev modified one of the linked module, that would effectively blew up any other project that is using this module. Integrity checks might help, that's seems that yarn doing it already? |
The main issue with symlinks is that if you delete the cache, your app will no longer work (as the symlink points to the cache). Hardlinks would solve this while still retaining the disk space advantages. Symlinks are essentially a pointer to another file path (so reading the symlink requires reading the file path it points to), while hardlinks result in multiple files pointing to the exact same data in the filesystem (so the file can be read directly). There's an existing issue about using hardlinks here: #499 The other main issue is that if someone modifies a file in I agree that it would be a great optional feature though. I'd use it! I'm going to close this out and we can follow up in #499. Thanks for using Yarn! 😄 |
This is perhaps a request for documentation. Are there reasons why it would be a bad idea for yarn to populate the node_modules directory of a project with symbolic links to package directories under ~/.yarn.cache rather than copying those directories? Obviously that would save a lot of disk space.
The text was updated successfully, but these errors were encountered: