I am using the workspaces
feature of node/npm and the layout is like that:
.
+-- package.json
`-- packages
`-- p1
`-- package.json
`-- p2
`-- package.json
./package.json
{
…
"workspaces": [
"./packages/*"
],
…
"dependcies": { … }
…
}
npm install
and everything is working to far. But now I would like to add the package p1
as dependency to package p2
. But how do I have to do that? Naively I have tried that:
./packages/p2/package.json
{
…
"dependencies": {
"p1": "*"
}
…
}
But that yields an error on install, telling me that p1
cannot be found the registry.