The official command: pnpm add -g pnpm
Alternatives:
npm i -g pnpm
pnpm setup
npx pnpm add -g pnpm
pnpm up --latest (for v7)
pnpm self-update
Others:
git restore . # Undo uncommitted changes
Different devices have different upgrade methods, which can easily lead to errors.
The official command: pnpm add -g pnpm
Alternatives:
npm i -g pnpm
pnpm setup
npx pnpm add -g pnpm
pnpm up --latest (for v7)
pnpm self-update
Others:
git restore . # Undo uncommitted changes