You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to be able to dev on a package "package-a" belonging to a yarn workspace while it is linked in a project "project-a" not related to this workspace.
We want to always have the same results than in prod, like when packages are taken from the registry for instance.
package-a belongs to the workspace and has a peerDependency on log-version ^1.0.0
package-b and package-c belongs to the workspace and both have a dependency on log-version@1.0.0
This makes log-version@1.0.0 be hoisted by the workspace
project-a has a dependency on log-version@1.1.0 and on package-a (version doesn't matter)
Note : The readme in the repo is much more detailed, I didn't know if I should have gone to this level of detail in the issue description. I can edit this post and add everything if you prefer 👍
I've done a repo that explains the problem, the solutions we've been thinking about and steps to reproduce with the files.
Yarn workspaces peerDependencies resolution repo
The issue summary
We want to be able to dev on a package "package-a" belonging to a yarn workspace while it is linked in a project "project-a" not related to this workspace.
We want to always have the same results than in prod, like when packages are taken from the registry for instance.
In dev
We link package-a in project-a and run project-a:
Expected behavior
Current behavior
BUT, package-a in fact uses log-version@1.0.0 because it is found in the workspaces root node_modules before!
Follow the steps, having in mind that package-a is linked into project-a:
In production
When not linked, we do have:
Environment
@arcanis
The text was updated successfully, but these errors were encountered: