I have a pnpm workspace with the following structure:
root
|- example
| |- package.json
|
|- packages
| |- a
| | |- package.json
| |
| |- b
| | |- package.json
| |
| |- c
| | |- package.json
The package c
is a package that should contain a
and b
:
{
"name": "c",
"dependencies": {
"a": "workspace:*",
"b": "workspace:*"
}
}
package.json
file in example
looks like this:
{
"name": "example",
"dependencies": {
"c": "workspace:*"
}
}
When I do pnpm install
it places only c
dependency in example/node_modules
- it does not install necessary packages a
and b
.
What do I have to do to have all nested dependencies installed correctly?
They are installed correctly. The
c
insideroot/example/node_modules
is a symlink toroot/packages/c
. The dependencies ofc
are symlinked toroot/packages/c/node_modules
.