Skip to content

install nvm

Joseph Cayouette edited this page Mar 12, 2020 · 4 revisions

Install Node Version Manager (nvm)

Excerpts from Antora docs

To use Antora you will need Node. The easiest way to obtain the correct node version is through the node version manager (nvm).

To install or update NVM, you can use the install script using cURL or Wget:

Using Curl
curl -o- https://github.com/nvm-sh/nvm/v0.35.3/install.sh | bash
Using Wget
wget -qO- https://github.com/nvm-sh/nvm/v0.35.3/install.sh | bash

Next, apply the changes that the nvm installer did to your ~/.bashrc file to your current shell session:

source ~/.bashrc

Install Node using nvm

We recommend using the Node Version Manager (nvm) to manage your Node installations, especially if your package manager does not provide Node and npm (Or the correct versions).

Note

CI environments use nvm to manage the version of Node used in the build job. By using nvm, you can align your setup with the environment used to generate and publish your production site.

Once you’ve installed nvm, open a new terminal and install the latest Node LTS release.

$ nvm install --lts

The above command will both install the latest LTS release of Node and automatically set it as your default alias.

Now that you have Node set up, you can Install Antora.

Upgrade Node using nvm

If you have nvm installed, but you don’t have an LTS release installed, type the following command in your terminal:

$ nvm install --lts

The above command will install the latest version of the latest Node LTS release.

To set the latest version of Node as the default for any new terminal, type:

$ nvm alias default 12

Now that you have Node set up, you can Install Antora.

Clone this wiki locally