Fill these in once
- Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bashRemove any Node.js you installed with Homebrew first (brew uninstall node), so the two don't clash.
- Load nvm into this terminal
source ~/.zshrc - Install a version and switch to it
nvm install 22 && nvm use 22 - Make it the default for new terminals
nvm alias default 22
Check it worked
- See the versions you have and which one is active
nvm ls && node --version
Undo it
- Remove a version
nvm deactivate && nvm uninstall 22
- Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash - Load nvm into this terminal
source ~/.bashrc - Install a version and switch to it
nvm install 22 && nvm use 22 - Make it the default for new terminals
nvm alias default 22
Check it worked
- See the versions you have and which one is active
nvm ls && node --version
Undo it
- Remove a version
nvm deactivate && nvm uninstall 22
- Install nvm for Windows
winget install CoreyButler.NVMforWindowsUninstall any other Node.js first, then close and reopen PowerShell.
- Install a version
nvm install 22 - Switch to itRun as administrator
nvm use 22
Check it worked
- See the versions you have and which one is active
nvm list; node --version
Undo it
- Remove a version
nvm uninstall 22