Techloset

Tech Tools and Frameworks

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

nvm is a version manager for node.js, designed to be installed per-user, and invoked per-shell. nvm works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and windows, WSL.

Naveed Sarwar

2 read

nvm-nodejs-installation

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

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

Find out where AI pays for itself in your business.

Thirty minutes with an engineer, not a salesperson. If the numbers say AI isn't worth it for you yet, we'll tell you that too.

Book an Opportunity Call