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

Potential bug - missing node_modules/.bin directory, after yarn add <package> #2135

Closed
ORESoftware opened this issue Dec 4, 2016 · 4 comments

Comments

@ORESoftware
Copy link

ORESoftware commented Dec 4, 2016

mkdir foo && cd foo && yarn add <package>

will create three items in foo:

foo/
  package.json
  node_modules/
  yarn.lock

however if we cd into node_modules

cd node_modules && ls -a

there does not seem to be a .bin directory, which normally houses the command line utilities.

Is this an expected omission or is this a bug?

On the other hand, if we did

mkdir foo && cd foo && npm install <package>

there would be a

./node_modules/.bin directory present

@ORESoftware ORESoftware changed the title Potential bug Potential bug - missing node_modules/.bin directory, after yarn add <package> Dec 4, 2016
@wyze
Copy link
Member

wyze commented Dec 4, 2016

If the package doesn't provide an executable, then the directory wouldn't be created until one does. In the issue template it asks to provide steps to reproduce and versions of Node, OS, Yarn. So please do that, and give exact steps to reproduce. Like yarn add left-pad instead of yarn add <package>.

@ORESoftware
Copy link
Author

ORESoftware commented Dec 4, 2016

Sure will do, try this:

mkdir foo && cd foo && yarn add suman-home

when I ran this, I did not get a ../foo/node_modules/.bin directory

but when I do

mkdir foo && cd foo && npm install suman-home

I do get a ../foo/node_modules/.bin directory

If you look at the suman-home project, it has babel and istanbul, which have executables...

@wyze
Copy link
Member

wyze commented Dec 4, 2016

I see. That package itself doesn't expose an executable but it's dependencies do. You will want to wait for #2053 to land.

Going to close this as duplicate of #760.

@ORESoftware
Copy link
Author

ORESoftware commented Dec 4, 2016 via email

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

2 participants