-
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
Trailing slash breaks workspace features when yarn run inside workspace folder #5816
Comments
Nope, you're right, this is a bug. Do you want to give it a shot at
figuring out what happens and fixing it?
…On Mon, May 14, 2018, 9:26 AM heupr[bot] ***@***.***> wrote:
Assigned #5816 <#5816> to @arcanis
<https://github.com/arcanis>.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#5816 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AA_Wa18OSpfW6rTG_t623qZvuqVQko3xks5tyT-ngaJpZM4T9WzR>
.
|
@arcanis I'm not sure if I'll have time, but in principle I'd like to try. I'll write a new comment before I start, so that you know whether I'm working on this. Until then, if anyone would like to tackle this, go ahead. |
I've started looking into it and I assume the root cause lies in micromatch or the arguments passed to it. I will continue diggin for a bit. |
I'm not sure how to add a test case for this bug. If you have any suggestions, I could try. |
This is considered intended behavior micromatch. It thus should be handled in the call to the function. |
Just ran into this in v1.10.1. Edit: This explains why |
I also just ran into this issue in yarn v1.15.2. Crazy. |
I ran into what is probably the same issue, where instead of a trailing For example:
|
Currently having this issue with this config:
At the root, I can find the packages. If I go to the package and add a dependency, it will create it in the packages node_modules instead of root. |
@simkessy for now, the workaround is to change that to
|
Wow, that was simple. This should be documented somewhere, wasted a lot of hours :( Thanks @forivall ! |
Do you want to request a feature or report a bug?
Bug.
What is the current behavior?
When the
workspaces
definition contains a trailing slash, running e. g.yarn workspaces info
in the root works just as expected. But when youcd
into the workspace folder and runyarn workspaces info
, it fails because it cannot detect that that folder is a workspace.If the current behavior is a bug, please provide the steps to reproduce.
package
.yarn init
insidepackage/
.yarn init
in the root.package/
(with trailing slash) as a workspace to the rootpackage.json
.yarn workspaces info
in the root. => Outputs workspace list correctly.yarn workspaces info
inpackage/
. => Fails withWhat is the expected behavior?
Running
yarn workspaces info
should output the workspaces when run both inside root andpackage/
.If this behavior is intended, the documentation could reflect the reason why.
Please mention your node.js, yarn and operating system version.
Node v8.11.1
Yarn v1.6.0
Ubuntu 16.04 LTS
The text was updated successfully, but these errors were encountered: