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

can not find executables in pnp mode after yarn unplug #6982

Closed
loveky opened this issue Jan 30, 2019 · 3 comments
Closed

can not find executables in pnp mode after yarn unplug #6982

loveky opened this issue Jan 30, 2019 · 3 comments
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.

Comments

@loveky
Copy link

loveky commented Jan 30, 2019

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

Bug

What is the current behavior?

  1. in our current project, run yarn --pnp to enable pnp mode
  2. everything works fine and I can yarn run xxx to run executables.
  3. I want to debug a package, so I do yarn unplug xxx and the package is copied to ./.pnp/unplugged/xxx-some-hash-here/node_modules/xxx/
  4. when I run yarn start, I got /bin/sh: xxx: command not found

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

I should be able to yarn run xxx just like before yarn unplug
Please mention your node.js, yarn and operating system version.

Mac OSX
Node v10.13.0
Yarn 1.13.0

After dive into the code base, I find this is probably caused by the .bin directory not being copied during yarn unplug. Then I found .bin is add to ignoreBasenames in #6628 intentionally.

Maybe we should add some login to keep copying .bin during yarn unplug ?

@SirNeural
Copy link

SirNeural commented Jan 30, 2019

I'm experiencing the same issue, running a yarn run command that references a bin from a package that has been unplugged returns a command not found error.
For reference I'm converting a nuxt 2.4.0 project to pnp, and the yarn --pnp process seems to automatically unplug nuxt, resulting in any calls to the nuxt bin to fail with command not found.
Running Mac OSX with Node v10.15.0 and yarn 1.13.0

@mayfieldiv
Copy link

I'm getting the same thing with packages automatically being unplugged (presumably because they have postinstall scripts), and then Yarn not being able to call the executables in the bin directories of those packages.

Is there any known workaround available for this?

@paul-soporan
Copy link
Member

@paul-soporan paul-soporan added the fixed-in-modern This issue has been fixed / implemented in Yarn 2+. label Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.
Projects
None yet
Development

No branches or pull requests

4 participants