-
Notifications
You must be signed in to change notification settings - Fork 17
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
Doesn't work with hoisted dependencies in monorepos #20
Comments
Hmm. It seems to work somewhat correctly if I set |
This might be easily solved with a recursive function until node_modules does not exists since |
Ideally I would be able to have a list of commands and this would add all the successful results:
This way I could have both binary in the local package and in the workspace package (if any) - and it would work with both npm and pnpm packages with the same config. |
I don't have time for it but it sounds useful. If you send a PR I'll look at it. |
In monorepos, especially managed by
lerna
orpnpm
,npm bin
doesn't return the correct binary directory, since a binary can be either hoisted to the root directory of the monorepo or be located in the package'snode_modules
. Solving this would probably require adding both the monorepo'snode_modules/.bin
as well package'snode_modules/.bin
to the path.The text was updated successfully, but these errors were encountered: