Skip to content
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

Native packages cleared and require rebuild every time #8041

Closed
Nantris opened this issue Apr 3, 2020 · 2 comments
Closed

Native packages cleared and require rebuild every time #8041

Nantris opened this issue Apr 3, 2020 · 2 comments
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.

Comments

@Nantris
Copy link

Nantris commented Apr 3, 2020

Bug description

This wasn't a problem in some earlier version (like maybe 1.17,x) but we've upgraded to the latest to keep up with security, and we have to rebuild everything, every time now.

Command

yarn

What is the current behavior?
Native dependencies built files are destroyed on every install. This makes installing any package, no matter how trivially small, a 10 minute or longer process.

What is the expected behavior?
Yarn spares the built files of native dependencies.

Steps to Reproduce

  1. Have a native dependency that has built output files
  2. Run yarn and watch them disappear

Environment

  • Node Version: 12.13.0
  • Yarn v1 Version: 1.21.1
  • OS and version: Windows 7
@Nantris Nantris changed the title Native packages rebuilt every time Native packages cleared and require rebuild every time Apr 3, 2020
@Nantris
Copy link
Author

Nantris commented Apr 18, 2020

This is a duplicate of #932, except that it affects newer versions of Yarn. I'm not sure what version this began, but I want to say it's related to this issue perhaps: #7807 (comment)

This worked fine for me in 1.17 and 1.18. I haven't tested reverting and running since that's probably a good hour total, but in the meantime I'm copying saved copied of native dependencies back into node_modules after running yarn, which is far from ideal. @arcanis any thoughts on this?

@merceyz
Copy link
Member

merceyz commented Jan 3, 2021

Closing as fixed in v2 where the tracking of what needs to be rebuilt has been greatly improved

https://yarnpkg.com/getting-started/migration

@merceyz merceyz closed this as completed Jan 3, 2021
@merceyz merceyz added the fixed-in-modern This issue has been fixed / implemented in Yarn 2+. label Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.
Projects
None yet
Development

No branches or pull requests

2 participants