-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Labels
Description
Verify latest release
- I verified that the issue exists in the latest pnpm release
pnpm version
10.13.1
Which area(s) of pnpm are affected? (leave empty if unsure)
Dependencies resolver
Link to the code that reproduces this issue or a replay of the bug
https://github.com/samchungy/pnpm-hoist
Reproduction steps
1. Run pnpm install
2. Look at node_modules with hoisted eslint, typescript and prettier
3. Run pnpm install --prod
4. Look at node_modules with hoisted eslint, typescript and prettier
Describe the Bug
Looks like the --prod
flag doesn't remove hoisted packages anymore. I only noticed when looking at my prod docker images and noticed some dev deps still in the image.
Expected Behavior
Running pnpm install --prod
should remove hoisted dependencies.
I traced this change down to version 9.11 of pnpm, 9.10 seems to remove the hoisted deps.
Which Node.js version are you using?
22.14.0
Which operating systems have you used?
- macOS
- Windows
- Linux
If your OS is a Linux based, which one it is? (Include the version if relevant)
Linux.