Don't auto-install peer dependencies
auto-install-peers
is on by default (mostly for consistency with npm@>=7, to help remove barriers when switching to pnpm
), but installing stuff we don't need is never ideal ... and implicitly installing stuff we do need isn't great either.
So I prefer to disable it, install the missing peer deps we need explicitly, and "fix" the ones we don't need via the "pnpm"
configuration entry in the root package.json
. If anything, this should speed up "cold" installations and reduce the size of node_modules
on disk.
Quick tip: pnpm i --resolution-only
to display peer deps issues at any time.
Edited by Axel Bocciarelli