node-nvm-switcher is a simple shell script designed to ease the process of switching between different Node.js versions globally on your system. It leverages the Node Version Manager (nvm) and Node Package Manager (npm) to automatically install the specified Node version and associated NPM version globally.
- Node Version Manager (nvm)
- Node Package Manager (npm)
- Clone the repo:
git clone https://github.com/ChrisdeWolf/node-nvm-switcher.git - Make the script executable (if necessary):
chmod +x node-nvm-switcher.sh - Add to PATH, env vars, or use as-is
Specify the desired version to switch to with -v or --version:
./node-nvm-switcher.sh -v <version>
example:
./node-nvm-switcher.sh -v 20.17.0