NPM setup

How to set up a Lisk Core node with NPM.

Pre-installation

Requirements

Supported Platforms
  • Ubuntu 18.04 (LTS) x86_64

  • Ubuntu 20.04 (LTS) x86_64

  • MacOS

Node.js
  • version 12 or higher

Node.js

Node.js serves as the underlying engine for code execution. There are several different methods and version managers used to install Node.js on your system. Please ensure the latest LTS version is used. It is recommended to deploy one of the following two versions shown below:

  • Option A - Node version manager

  • Option B - Node.js package

It is recommended to use a Node version manager such as NVM. NVM is a bash script that enables the management of multiple active Node.js versions.

  1. Install NVM and follow the official instructions here.

  2. Install the latest LTS version of Node.js using NVM with the following command shown below:

nvm install 12.20.0

If NVM or other package managers are not required, it is possible to install the Node package globally as shown in the following commands below:

Ubuntu

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs

MacOS

For MacOS, please execute the following command below:

brew install node@12.20.0

Installation

Install Lisk Core with NPM:

npm install --global --production lisk-core

Start

After successful installation, start the node with the following command:

lisk-core start --network betanet