Step 1: Install NVM
- Open your terminal.
-
Run the following command to download and install NVM:
🔹 Replace
v0.39.7with the latest NVM version from the NVM GitHub. -
Reload your shell configuration to apply changes:
-
Verify NVM installation:
If NVM is installed correctly, you’ll see its version number.
Step 2: Install Node.js Using NVM
-
List available Node.js versions:
-
Install the latest stable Node.js version:
OR, install a specific version (e.g., 20.14.0):
-
Verify the installation: