-
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
Yarn removes compiled libraries if "Linking dependencies" was interrupted by user #3752
Comments
Thanks, @d4rky-pl. |
Furthering d4rky-pl's reproduction steps: mkdir test-bug
cd test-bug
yarn init
yarn add node-sass
ls node_modules/node-sass/vendor # the vendor contents are correctly there
# Simulate the user/system exiting during the linking step
# The linking step removes the `.yarn-integrity` file
rm node_modules/.yarn-integrity
yarn
ls node_modules/node-sass/vendor # (!) the vendor contents are gone It seems to be the deletion of the integrity file means the package-linker no longer has context of module artifacts the next time yarn is invoked. If the integrity file is missing on init of yarn, should it do a force install of all modules (like Happy to help, if someone can point me in the right direction 😸 |
@jamsinclair I think you are right. Some pointers: https://github.com/yarnpkg/yarn/blob/master/src/cli/commands/install.js#L481 - this is where it runs scripts. It is strange that it does not run the scripts in this case, yarn 0.28 should do it. |
@BYK @bestander @kaylieEB Looks closeable per #4185 |
Thanks again @olingern ! 🎉 |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
If I stop yarn during
Linking dependencies
(via ^C, for example because I made a mistake and wanted to stop and add--dev
) then when installing any new package, compiled files in unrelated packages are removed and not recompiled properly.If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Yarn should either not remove compiled binaries if "Linking dependencies" step has been interrupted or recompile them afterwards.
Please mention your node.js, yarn and operating system version.
yarn
: 0.24.6node
: v8.1.2OS
: macOS 10.12.15The text was updated successfully, but these errors were encountered: