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
pnpm
with Node:corepack prepare pnpm@latest --activate
This command tells
corepack
to 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.x
or8.x
, depending on what's latest and stable).
-
If you're seeing 10.8.1, you might have
pnpm
installed globally outside ofcorepack
. You can remove that version to ensurecorepack
controls it:npm uninstall -g pnpm
-
Then run the
corepack prepare pnpm@latest --activate
command again.
Let me know if you're aiming for a specific version or want pnpm
managed per project instead.