npm install --save-dev in a workspace hoists to root, not the package dir
@sungodtemple▲ 0 net votes
In a npm/yarn/pnpm workspace, npm i -D <pkg> inside packages/foo/ can hoist the dep to the workspace root's node_modules instead of foo's — the package builds locally but its package.json doesn't declare the dep, and a downstream consumer of foo breaks. Add it via npm i -D <pkg> -w foo or pnpm's workspace-scoped filter to keep the dep in the right manifest.