Installing Node.js

Caplin Trader’s build stack runs on Node.js. This page provides guidance on installing Node.js on Microsoft Windows, Apple macOS, and Linux.

These instructions are for installing a single version of Node.js. For advanced installations that manage multiple versions of Node.js, see Node Version Manager.

Requirements

To use Node.js for Caplin Trader development, ensure the following requirements are met:

Node.js version

Caplin Trader’s build stack requires Node.js 8, with npm 4 or the latest version of yarn.

Node.js 8 includes npm 5, which has a known issue that prevents it from working with Caplin Trader 5. Until this issue is fixed, downgrade to npm 4 or use the latest version of yarn.

To downgrade to npm 4, run the command below:

npm install -g npm@4

For Windows 10 developer machines, we recommend a minimum of 4GB of RAM.

Network connectivity

Caplin Trader’s build stack requires Internet access to the following domains:

  • The npm registry (registry.npmjs.org)

  • GitHub (github.com)

The npm package manager does not have built-in support for Microsoft NTLM authentication. If you access the Internet via a proxy server that uses NTLM authentication, then configure npm to use a transparent proxy (if available) or configure npm to use an intermediate local proxy that appends your NTLM credentials to npm’s requests.

Installing Node.js on Microsoft Windows

For the Node.js installer, see Node.js Downloads on the Node.js website.

To install the build environment required to build native Node.js modules, see Compiling native AddOn modules in the Microsoft Node.js Guidelines.

Installing Node.js on macOS

We recommend installing Node.js using Homebrew. The Homebrew package for Node.js automatically configures the npm package manager to install global items to a location under your home directory (see npm’s prefix variable).

Installing Node.js on Linux

After installation, you may need to reconfigure the npm package manager to install global items to a location under your home directory (see npm’s prefix variable). For system-wide installations of Node.js, the default location for global items is the installation location for Node.js: /usr or /usr/local. This location is not suitable for developers, who should instead set the prefix variable to a location under their home directory.

To discover the location of npm’s default directory, run the command below:

npm config get prefix

If the directory returned is not under your home directory, follow the instructions in 'Option 2' under Fixing npm permissions on the npm registry website.