Node and Node Version Manager

This page is out of date and needs reviewing.

A Lando container with Node and other front end tools is provided with each project so there is no requirement to install Node on your system. It is however a useful tool and you may find it is required for non-Drupal specific jobs.

To manage Node on your host machine you will install and manage it with Node Version Manager (NVM). This allows you to have multiple versions of Node on your system for different projects (if needed).

Installation

To install Node run the following command in your host machine:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash

Open a new shell window and you should be able to install a Node version. We currently use the carbon LTS version of Node. Install it with:

nvm install lts/carbon

To set this as the default version of Node issue the following command:

nvm alias default lts/carbon

Usage

When you want to use this version of Node you can use:

nvm use default

You can also install specific versions of Node if required. Say you needed Node version 4 for an older project, you can install it with:

nvm install 4.8.0

Then to use it:

nvm use 4.8.0

Resources

Further documentation:

Last updated: