Helps contributors switch from npm to pnpm in this repo, including upgrading Node.js to v24 via nvm or volta if needed.
Use this skill when a contributor needs to switch from npm to pnpm in this repository.
Run:
pnpm -v
If this succeeds and the major version is 10 or above, pnpm is already set up. Inform the user and stop — nothing else is needed.
If pnpm is installed but the major version is below 10, tell the user their version is too old and continue to Step 1 to upgrade Node and reinstall pnpm via corepack.
Run:
node -v
Parse the major version from the output (e.g. → ).
v22.1.022Try each version manager in order.
Check if nvm is available:
nvm -v
If it succeeds, run:
nvm install
nvm use
The repo has an .nvmrc set to 24, so these commands will install and activate the correct version automatically. Then continue to Step 2.
If nvm -v failed, check if volta is available:
volta -v
If it succeeds, run:
volta install node@24
volta install corepack
Then continue to Step 2.
If both nvm -v and volta -v failed, tell the user:
Neither nvm nor volta was found. Install nvm by following the instructions at https://www.nvmnode.com/guide/installation.html#nvm-install, then come back and run this again.
Stop here. Do not proceed until the user has a version manager installed.
Run:
corepack enable pnpm
Let the user know that pnpm is now installed and ready. This repo currently uses npm, so they should continue using npm commands for this project — pnpm is installed for future use when the repo migrates.