Closed mrjackdavis closed 1 year ago
I can't reproduce this issue. For me, this works properly:
Could you please provide a repo that exhibits the issue? Please make sure you have jest
installed locally in the workspace.
If you have jest
installed globally but not in the repo, which jest
will succeed whereas yarn bin jest
will fail:
jason@pop-os ~/p/t/yarn-bin-test (main)> which jest
/usr/local/bin/jest
jason@pop-os ~/p/t/yarn-bin-test (main)> yarn bin jest
error Couldn't find a binary named "jest"
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
Given
workspaces/mypkg/package.json
containsRunning
yarn nx test mypkg
yieldsMODULE_NOT_FOUND
Expected Behavior
Given
workspaces/mypkg/package.json
containsRunning the script produces the correct behaviour (i.e. it doesn't fail). This bug is only evident when running scripts via NX
Steps to Reproduce
package.json
script with theyarn bin
version of the command. e.g."test":"jest"
becomes"test":"node $(yarn bin jest)"
yarn nx test mypkg
Failure Logs
Environment