Verify latest release
pnpm version
10.32.1
Which area(s) of pnpm are affected? (leave empty if unsure)
Operating System (Windows, MacOS, Linux), CLI
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
- Install pnpm with npm:
npm -g I pnpm
- Either run
pnpm setup or set the environment variable manually: export PNPM_HOME=~/.pnpm
- Install any package globally with pnpm, for example,
pnpm -g i serve
- The binary of the installed package is placed in the root of the
PNPM_HOME folder.
- Because
PNPM_HOME points to a folder that contains other necessary for pnpm folders in addition to the binaries, these folders become available for typing/executing in the terminal (although they don't work, of course). So, you can start typing "glo" or "sto" and press Tab, and the terminal will show global or store as available commands/binaries, although they aren't actually available.
Describe the Bug
This isn't so much a bug as it is a slightly incorrect way to handle the coexistence of binaries installed globally with pnpm and the directories it requires.
TLDR: Because PNPM_HOME requires specifying the root path of a folder containing other folders besides the binaries of globally installed packages, the global environment space is polluted.
Expected Behavior
Globally installed binaries should be stored in a separate directory, such as bin, as is implemented in most tools, so that the structure is:
|-bin
|--serve
|-global
|-store
Which Node.js version are you using?
24.14.0
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response
Verify latest release
pnpm version
10.32.1
Which area(s) of pnpm are affected? (leave empty if unsure)
Operating System (Windows, MacOS, Linux), CLI
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
npm -g I pnpmpnpm setupor set the environment variable manually:export PNPM_HOME=~/.pnpmpnpm -g i servePNPM_HOMEfolder.PNPM_HOMEpoints to a folder that contains other necessary for pnpm folders in addition to the binaries, these folders become available for typing/executing in the terminal (although they don't work, of course). So, you can start typing "glo" or "sto" and press Tab, and the terminal will showglobalorstoreas available commands/binaries, although they aren't actually available.Describe the Bug
This isn't so much a bug as it is a slightly incorrect way to handle the coexistence of binaries installed globally with pnpm and the directories it requires.
TLDR: Because
PNPM_HOMErequires specifying the root path of a folder containing other folders besides the binaries of globally installed packages, the global environment space is polluted.Expected Behavior
Globally installed binaries should be stored in a separate directory, such as
bin, as is implemented in most tools, so that the structure is:Which Node.js version are you using?
24.14.0
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response