Hi, within one of my workspaces I am trying to create an alias for a workspace dependency:
"dependencies": {
"foo": "workspace:@bar/baz"
}
The @bar/baz workspace would be added as a dependency, but inside the node_modules the symlink would be named foo.
However it seems that aliases for workspace dependencies aren't supported, resulting in the following error:
Scope: all 2 workspace projects
ERROR  Invalid workspace: spec (workspace:@bar/baz)
at Error: Invalid workspace…
node -v prints: v12.16.0if you just write "foo": "npm:@bar/baz", it should work. Of course, supporting something similar through the workspace protocol would be nice as well.
Yes that's my problem, I need to create an alias for a workspace, not a package on the npm registry.
That syntax will work. It will search for @bar/baz in the repository before searching in the registry
That's great thanks! It works perfectly :)
Most helpful comment
That syntax will work. It will search for
@bar/bazin the repository before searching in the registry