-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
workspaces: "yarn run" inside a package should run binaries from root node_modules #6148
Comments
That actually should work because I believe yarn creates However, you should be able to achieve the same by going through
|
yarn only creates the I'll check out the workspace command... thx for the tip @pronebird |
Same here. We have
In order for it to work we have to run:
Not sure why yarn doesn't do it by default. |
Scripts can run binaries from the root, but In a workspace with typescript in the root package: "scripts": {
"build": "tsc"
}
|
appears fixed in |
This doesn't appear to be fixed for me? package.json (this is inside a monorepo)
|
In the package.json script just use "lerna ..." directly instead of "yarn lerna ...". It works. |
@AviVahl Nope I tried that too: package.json
I see now that it's a slightly different error message, but it still doesn't work... |
It's working for my scenario with tsc, and lerna works too even though it's only in the root package:
@uncleramsay do you have a |
Yeah, I have it at the root of my monorepo. Confused why my scenario is different :S |
Try the steps in the top of this issue. Does that work on your system? |
This should not be closed, it's still a very open issue with Yarn 1.17.3. |
the steps which I've described in the top of this issue work well now. please clarify what you mean by open? are you experiencing it when using the same steps? If you're experiencing the same issue, I'll reopen this one. |
Hi, I am wondering without no-hoist, how can I run a script like this while inside a subpackage:
|
Do you want to request a feature or report a bug?
feature request for better usability of workspaces
What is the current behavior?
yarn run
only runs bins that were specified in the package itself, not ones from workspace's rootpackage.json
.If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
It should also find binaries from root
node_modules
, and run them with cwd set to the current package I'm in.Please mention your node.js, yarn and operating system version.
node 8.11.3, yarn 1.9.1, fedora 28
The text was updated successfully, but these errors were encountered: