Skip to content

Instantly share code, notes, and snippets.

@phette23
Last active May 8, 2026 14:48
Show Gist options
  • Select an option

  • Save phette23/30b822cd445335c55dd568c26e612f35 to your computer and use it in GitHub Desktop.

Select an option

Save phette23/30b822cd445335c55dd568c26e612f35 to your computer and use it in GitHub Desktop.
pnpm 11 doesn't migrate global bins

PNPM 11 doesn't migrate global bins

If you upgrade from pnpm v10 to v11, all your global pnpm binaries stop working because there is a new binary directory for PATH but none of the bins are moved to the new folder. This change is not mentioned in the upgrade guide nor does there appear to be a script or command to resolve it. pnpm setup adds $PNPM_HOME/bin to PATH but doesn't move the binaries in $PNPM_HOME into it. You have to manually reinstall all global binaries after upgrading.

$ uname -a
Darwin name 25.x.y Darwin Kernel Version 25.x.y: ... arm64
$ pnpm --version
10.x.y
$ pnpm ls -g
trash-cli@x.y.z ...
fx@z.y.x ...
$ touch file.txt && trash file.txt # works
$ pnpm self-update
$ pnpm --version
11.x.y
$ pnpm ls -g
[ERROR] The configured global bin directory "/Users/ephetteplace/Library/pnpm/bin" is not in PATH
Run "pnpm setup" to update your shell configuration.
$ pnpm setup
Appended new lines to /Users/ephetteplace/.config/fish/config.fish

Next configuration changes were made:
set -gx PNPM_HOME "/Users/ephetteplace/Library/pnpm"
if not string match -q -- "$PNPM_HOME/bin" $PATH
  set -gx PATH "$PNPM_HOME/bin" $PATH
end

To start using pnpm, run:
source /Users/ephetteplace/.config/fish/config.fish
$ exec fish
$ pnpm ls -g
No global packages found
$ touch file.txt && $PNPM_HOME/bin/trash file.txt
fish: Unknown command: /Users/.../pnpm/bin/trash
$ ls $PNPM_HOME
bin/ fx global/ pn pnpm pnpx pnx store/ trash
$ ls $PNPM_HOME/bin # empty

Example global bins here are fx and trash-cli, but as you can see this also applies to all of pnpm's own binaries. It stops working if you remove $PNPM_HOME from your PATH, because pnpm and pnpx etc. are left there, too.

The prior global state is retained at /Users/ephetteplace/Library/pnpm/global/5 so one can pipe a pnpm ls from there to pnpm add -g, but then you also have to clean up this old state since it's left there and pnpm commands with -g flags no longer manage it.

Basically, I expect pnpm setup to do more of this work, or to have some other scripted solution. Instead, I am doing an awful lot of manual work to make pnpm v11 return to working order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment