-
Notifications
You must be signed in to change notification settings - Fork 604
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
[rush] bin
field is ignored for linked packages
#1100
Comments
Your repro is using the style where NPM itself generates the binary script during installation. Since Rush links (rather than installs) the local projects, rush would need to reproduce that binary-generating heuristic, which is nontrivial and a little different for yarn/pnpm/npm. For our projects, we instead explicitly define the binary script, like this: The api-documenter project depends on api-extractor. If you run
Would that solve your problem? |
Sorry, I'm not sure I'm following. What's different between the repro repo and the way api-extractor gets written into the node_modules/.bin of api-documenter in the web-build-tools repo? |
@lhorie sorry I overlooked your reply back in Feb. The difference is that with api-extractor's, the symlink target exists at the time when Does that make sense? |
@Toxaris I agree that perhaps all these issues could be solved by updating Yarn/NPM to use the more sophisticated This should be an easy fix. Maybe someone could create a PR? |
Bit late to the party, but after testing with @lhorie 's repro repo, @octogonz 's recommended solution isn't actually why it's working for Looks like the same issue exists with npm, so I think the only solution is something like |
PR made for this: #1256 |
We just hit this issue when trying to add Rush to our repo using yarn as the package manager. Specifically, we can't see any bin scripts added to |
Still experiencing issues with this. Please fix! 😁 |
We are also still experiencing this issue. A workaround is to |
If a rush workspace contains two projects, one of which has a
bin
script and the other depends on the first, the second project will not get anode_modules/.bin
symlink to the script of the first.See this repo for repro steps: https://github.com/lhorie/rush-bin-bug
PS: I'm willing to submit a PR to fix this if someone can guide me to the appropriate whereabouts
The text was updated successfully, but these errors were encountered: