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

Scoped binary deps are not added to node_modules/.bin #1487

Closed
arv opened this issue Oct 26, 2016 · 9 comments
Closed

Scoped binary deps are not added to node_modules/.bin #1487

arv opened this issue Oct 26, 2016 · 9 comments

Comments

@arv
Copy link

arv commented Oct 26, 2016

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

  • Add a dependency to a scoped package that has a bin field in its package.json.
  • Run yarn
  • ls -al node_modules/.bin/
  • This does not include symlinks to the binaries defined by the scoped package or its dependencies.

What is the expected behavior?

  • There should be symlinks to the binaries defined by the scoped package.
  • There should be symlinks to the binaries defined by the dependencies of the scoped package.

At least that is what npm does and we started depending on it.

Please mention your node.js, yarn and operating system version.

Yarn: 0.16.1
Node: v6.7.0
OS: macOS Sierra

@jokeyrhyme
Copy link

e.g. @jokeyrhyme/node-init: just something I put together to keep certain conventions consistent across all my Node.js projects

yarn global add @jokeyrhyme/node-init
node-init --version
# => zsh: command not found: node-init

npm install --global @jokeyrhyme/node-init
node-init --version
# => 1.6.0

@jeffturcotte
Copy link

Would love to see this fixed. npm scripts referencing local binaries must inconveniently use the full paths. Thanks!

@sdd
Copy link

sdd commented Mar 7, 2017

Whenever I run yarn add I need to follow this up afterwards with npm install cross-env mocha.

@stephan-v
Copy link

Back to npm we go.

@rapee

This comment has been minimized.

@lukebatchelor
Copy link

Looks like this was fixed in #3310 (same as #2758 (comment))

This should be able to be closed 👍

@sandorfr
Copy link

sandorfr commented Feb 13, 2019

It's not working for me for locally installed packages on version 1.13.0
my bad see comment below

@sandorfr
Copy link

sandorfr commented Feb 25, 2019

Neither is it working with global packages.
@bestander any thoughts on this?

Actually, switching to npm, I realized the package was had errors in the binary names. Npm fails with an ENOENT error at install which is ok. Yarn succeeds without any warning.

I think Yarn should at least issue a warning or maybe just fail to remain in sync with Npm behavior. An explicit error would be good to. Maybe something like: Executable 'xxx' with path 'bin/xxx' does not exist in the package.

And I agree with @lukebatchelor it should be closed as it's resolved (it will make it clear to everyone it's closed and they should triple check the packages).

@bestander
Copy link
Member

Thanks, @sandorfr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants