Skip to content

Instantly share code, notes, and snippets.

@washopilot
Created April 23, 2025 20:50
Show Gist options
  • Save washopilot/c164fd26d8a180a402b09401399daa86 to your computer and use it in GitHub Desktop.
Save washopilot/c164fd26d8a180a402b09401399daa86 to your computer and use it in GitHub Desktop.
Update pnpm via corepack

To update pnpm via corepack (especially when using nvm and Node 22), you can follow these steps:


✅ Step-by-Step: Update pnpm via corepack

  1. Enable corepack (you probably already did this):

    corepack enable
  2. 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 of pnpm.

  3. Verify the version:

    pnpm -v

    This should now reflect the most up-to-date version available through Corepack (currently around 9.x or 8.x, depending on what's latest and stable).


⚠️ Notes

  • If you're seeing 10.8.1, you might have pnpm installed globally outside of corepack. You can remove that version to ensure corepack 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.

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