Streamlining Node Installation: Unleashing the Power of NVM

Streamlining Node Installation: Unleashing the Power of NVM

nvm-sh is a great opensource tool that allows you to install and manage multiple versions of node in same system with ease.

ยท

1 min read

nvm allows you to quickly install and use different versions of node via the command line.

key benefits of using

  • available for Windows, Linux and macOS

  • Easy to install

  • can have and switch between multiple versions of nodejs easily

1. Steps to install NVM

Step-1: Below, you'll find the installation script provided by nvm-sh. Simply copy and paste any of these scripts into your terminal or WSL (for Windows), and it will seamlessly handle all the setup for you.

๐Ÿ”— refer to official documentation for details

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash

Step-2: After the script is completely executed restart your terminal window

you can verify the installation using nvm --version command in your terminal.

2. Installing nodejs using nvm

  1. Install the latest version
 $ nvm install node # Install the latest version of nodejs
                    # "node" is an alias for the latest version
  1. install the specific version
nvm install 14.7.0 # or 16.3.0, 12.22.1, etc

๐Ÿ”— For further commands for managing and switching between multiple versions please refer to official documents by ๐Ÿ”—clicking here

ย