Do you want to request a feature or report a bug?
Bug
What is the current behavior?
In yarn workspaces, if one package depends on another package with bin files (and present as a package in the workspace), the bin file is symlinked to the dependent package so it can be run. This behaviour is broken when PnP is turned on. The bin file is no longer symlinked, which is expected as it should use the PnP resolver to find them, but it doesn’t seem to be able to locate the binary.
If the current behavior is a bug, please provide the steps to reproduce.
Clone this repo: https://github.com/KwanMan/yarn-pnp-workspaces
# bootstrap
cd ./with-pnp
yarn
cd ./packages/package-a
## bin files are not symlinked as expected, as doing `yarn run [cmd]` should use the pnp resolver
ls node_modules/.bin
yarn run build ## but it doesn't resolve correctly and can't find the bin file
What is the expected behavior?
It should correctly resolve bin files of packages in the same workspace
The linked repo contains the same setup without pnp which works
# bootstrap
cd ./without-pnp
yarn
cd ./packages/package-a
## bin files from `build-script` is symlinked in so we can use them here
ls node_modules/.bin
yarn run build ## runs fine
Please mention your node.js, yarn and operating system version.
Node v10.11.0
Yarn 1.12.1
MacOS High Sierra 10.13.6
@arcanis With latest release when I try to run
babel-node
I’m gettingAlso
husky
andnodemon
are not working properly with pnp enabled.