How-to

How to Install Node.js Locally with Node Version Manager (nvm)

By Naveed SarwarApril 9th 2022

How to Install Node.js Locally with Node Version Manager (nvm)



Download the install script

Using curl, or wget, download the installation script. In the URL below make sure you replace v0.35.0 with the latest version of nvm.

curl -sL https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh -o install_nvm.sh

It's not a bad idea to open the install script and inspect its contents given that you just downloaded it from the Internet.

Source the new instructions NVM added to .bashrc during the installation process. You can either exit and re-enter the shell console, or manually source your .bashrc file. This file is almost always located at the root of your home directory.

source ~/.bashrc

As an alternate method, you can execute the new instructions in the same console to apply them immediately.

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion


You can confirm the version of NVM that is running with the following command:

nvm --version

SearchIcon

Latest

Image1

App Ideas: Top 20 App Development Ideas To Explore In 2022

March 22nd 2022

Image1

Code Box Test

March 25th 2022

Image1

How to lead the team in a finest way!

June 8th 2022

Address

Head Office:

717 K Street, STE 207 Sacramento, CA 95814, United State

Phone: +1 (916) 822 7374

Corporate Office:

P681 W Canal Rd, Amin Town, Faisalabad, Pakistan

Landline: +92 (41) 87 50005


Whatsapp: +92 (327) 87 50005

Follow us

COPYRIGHT © 2023 TECHLOSET. ALL RIGHTS RESERVED.