RSS Amplifier

christalks.dev latest posts · Jul 18, 2024

Installing custom node versions using Node Version Manager

0
Sign in to vote or save

christalks.dev

This is a simple how-to to install Node on any Linux user account, tied to a specific version. To achieve this, we'll use Node Version Manager, an open source project that makes installing any Node version quick and easy.

This tutorial is specific to Linux, although works on MacOS in exactly the same way.

  1. Install NVM using the installer.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
  1. In the same session, reload your bashrc file. This makes nvm available to your current session.
source ~/.bashrc
  1. Install your desired version by running the nvm command. This will also set the initial default. For this example, I'll installed node which defaults to the latest available version. I'll also use the --lts flag to ensure we download the latest Long Term Support package.
nvm install node --lts

And that's it. If you run node -v, you should now see the Node version that you requested to be installed!

Read the original on christalks.dev

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.