To update pnpm via corepack (especially when using nvm and Node 22), you can follow these steps:
-
Enable
corepack(you probably already did this):corepack enable -
Check the currently bundled version of
pnpmwith Node:corepack prepare pnpm@latest --activate
This command tells
corepackto download and use the latest available version ofpnpm. -
Verify the version:
pnpm -v
This should now reflect the most up-to-date version available through Corepack (currently around
9.xor8.x, depending on what's latest and stable).
-
If you're seeing 10.8.1, you might have
pnpminstalled globally outside ofcorepack. You can remove that version to ensurecorepackcontrols it:npm uninstall -g pnpm
-
Then run the
corepack prepare pnpm@latest --activatecommand again.
Let me know if you're aiming for a specific version or want pnpm managed per project instead.