If we want to install version 12.22.7, we simply run nvm install 12.22.7: Running nvm install node installs the latest Node version available at the time. To find the list of available Node versions: nvm ls-remote This is done by running nvm install -lts, which produces the below screen:Īfter this installs, it will automatically set the default Node version to the LTS that we just downloaded.įor this tutorial, we want three Node versions running on our machine. Let’s start by installing the latest LTS version, which is version 16.13.0 at the time of writing this article. To install a Node version, simply run the following command: nvm install. Now, let’s install and manage multiple Node versions. "$NVM_DIR/nvm.sh" # This loads nvmĪfter that, exit the terminal and reopen it. In my case, I’m using ~/.bashrc: //source line addedĮxport NVM_DIR="$([ -z "$/nvm")" This script downloads the entire NVM repository to ~/.nvm and adds the source lines from the snippet below to the correct shell startup script, that is, ~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc, depending on the shell program you are using. Running the above command downloads a script and runs it.
If for any reason, you do not have cURL installed on your machine, you can download it from this guide. To install NVM, run the following command on your terminal: curl -o- | bashĬURL comes with most Linux-based operating systems. Discover popular ORMs used in the TypeScript landscape.Explore Tauri, a new framework for building binaries.
As developers, working on multiple projects simultaneously is normal, but switching between different versions of software can become painstaking and annoying. When tech evolves, especially in development, versioning issues can arise. I love building stuff with great technology. Precious Luke Follow Open source crusader.