Open lkho opened 2 years ago
When the local directory is in a subdirectory it makes sense to create a workspace and it will work as you expect.
I think this feature should be supported separately from workspaces. For example, if I have two separate workspaces and I want to locally import a package from one workspace into another, then the nested dependencies need to be carried with the imported package.
I need to quickly verify local changes to a library in another local package where my demo app is located. This is not a case for workspaces.
pnpm version: 6.18.0
Code to reproduce the issue:
$ pnpm add ./local/package1
$ pnpm install
$ node index.js
Expected behavior:
index.js should run successfully without errors.
Actual behavior:
package
addition
is not installed in anywhere, and nodejs errored whenrequire('addition')
in.\local\package1\index.js
The docs (https://pnpm.io/cli/add#install-from-local-file-system) says
pnpm add
is same aspnpm link
on a local directory. But it isn't, and it should NOT (in my opinion). It is weird thatpnpm link
does install the nested dep correctly, inside the local dir (but didn't modify package.json), whereaspnpm add
don't.Additional information:
node -v
prints: v14.17.0