-
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 does not symlink missing binaries #3421
Comments
Currently Yarn creates these bin links during it's 'link packages' step. Install and post-install scripts are not run until after this step. It might be feasible to re-order these steps, but the 'link' step is currently more complicated that just creating the bin links, so that 'link' step would need to be split up. Perhaps the order should be:
I could work on refactoring this if that behavior change seems reasonable. |
Does npm run install scripts before bin links are created and post install after? |
+1 |
Overall issue; Yarn should run the Yarn does run the The scripts for deps are run by
The bin links are created as part of the overall "link" process in From some testing with NPM, the order it takes is:
Fixing this will take some code rearranging to ensure |
Same issue: adding While running |
Same issue using The workaround that works for me is running |
I have this same issue. I want to build some native code in a Adding it a second time works. |
+1 for this change |
Extending @mauricedb's workaround: Put this in your
|
This is also affecting package
|
See yarnpkg/yarn#3421. Resolves #290. [skip ci]
Encountering the same issue with a dependency installed from github, and the provided work-arounds using |
@joelclimbsthings which package? Does the package have a build step? Does it correctly mark the built files as the official |
Hey @cinderblock. The issue is with this fork of firebase-tools: https://github.com/firebase/firebase-tools/tree/v9.1.0 |
Changing What's interesting is when testing this locally, Edit: I missed that this is specifically talking about the |
Does this mean that there is no way to link a binary using yarn if the module is building the file itself? |
#3 yarnpkg/yarn#3421 (comment) test test test test test test test test test test test test test test test test
I ran into this issue myself for a project that is meant to be a dependency that downloads a platform-specific binary (from another project on github) to the parent project, as part of the I managed to work around it by creating a "stub" binary file (as shell script with only an informational echo), so that there is something for yarn to link; and then running the binary build script as part of the It's a little hacky (but in my case the whole repo is kind of a hack to install a 3rd party binary anyway, so it fits right in). I hope this is helpful anyone currently using other workarounds. (P.S. This is the project, if you want to check what I did: https://github.com/brombal/just-install) |
What is the current behavior?
When you npm install a package like sentry-cli-binary the postinstall step will download a platform specific executable and put it into the bin folder. With yarn the symlink is not generated because the file does not exist yet.
If the current behavior is a bug, please provide the steps to reproduce.
Make a dependency to
sentry-cli-binary
and observe that yarn does not install the symlink for the binary whereas npm does.What is the expected behavior?
The same behavior that npm shows.
Versions tested
The text was updated successfully, but these errors were encountered: