Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

install nvm

Julio González Gil edited this page Sep 26, 2019 · 5 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://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
Using Wget
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/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 10

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

Clone this wiki locally