Here's a simple tutorial on installing Node.js using NVM (Node Version Manager) and getting the LTS (Long-Term Support) version:
- macOS or Linux-based system
- Text editor
- Terminal/Command Line
- Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
- check https://github.com/nvm-sh/nvm if you find any errors
- Close and reopen your terminal window.
- Verify NVM Installation:
nvm --version
- Install the LTS version of Node.js:
nvm install --lts
- Make the LTS version the default:
nvm use --lts
- Verify Node.js installation:
node -v
npm -v
- Download the installer directly from the official Node.js website (https://nodejs.org/en/download) and run it. Or
- Use Node Version Manager for Windows (nvm-windows), found on GitHub (https://github.com/coreybutler/nvm-windows).
- List available Node.js versions: nvm ls-remote
- Switch between versions: nvm use