-
Can anyone shed light on why pnpm has chosen to have “pnpm run” operate on the current folder’s package by default, but “pnpm install” installs all packages by default? Or put another way: If I go to a specific package why should I be “burdened” with the entire repo’s worth of packages? I just want the package I have open (plus its dependencies). I don’t mind pnpm’s current behaviour, but I’d love to hear if there are explicit reasons for it or if it just kinda evolved that way? And at any rate thanks for making pnpm available, it’s truly been a pleasure to work with so far. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
All the packages in a workspace use a single lockfile and a single virtual store (at |
Beta Was this translation helpful? Give feedback.
All the packages in a workspace use a single lockfile and a single virtual store (at
<repo root>/node_modules/.pnpm
), so it would be hard to install dependencies of a single project in isolation. Also, there might be some shared dev dependencies in the root package.json of the workspace, so it makes little sense to ever not install the dependencies of the root package.json. In a previous version,pnpm install
used to install only the dependencies of the project in the active working directory. But it was error prone. Installing everything is pretty fast with hot cache and saves a lot of headache.