I'm trying to switch to yarn workspaces, in V2 but keep getting an Invalid dependency range
error for the new workspaces:
syntax when used with peerDependencies
I've tried using an exact range, workspaces:*
and carat syntax workspaces:^
with no luck.
Is this just not supported with Yarn Workspaces? Is the problem that I'm using an alpha package with a peerDependency?
If I take out the peer dependency and only leave in the devDependency in the same package (for importing the package in testing) the same package resolves successfully
workspace package.json:
{
"name": "spaceA",
"version": "1.0.0-alpha.4",
"peerDependencies": {
"spaceB": "workspace:*", # << Fails No Matter What
},
"devDependencies": {
"spaceB": "workspace:1.0.0-alpha.3" # << Works with all syntaxes
}
}