Skip to content

Latest commit

 

History

History
49 lines (27 loc) · 1.92 KB

install-nodejs.md

File metadata and controls

49 lines (27 loc) · 1.92 KB

Install NodeJS

Linux

Node is available in most of Linux distributions, you use system built-in package manager to install it directly.

For example, for ubuntu and debian users, use apt-get to install it.

apt-get install nodejs

For Redhat/CentOS/RHEL, you can use yum or new dnf command to install it.

If you want to install the newest NodeJS for your system, check the official installation guide to install NodeJS using NodeSource repository.

Windows

For users, you can download the NodeJS installer from nodejs.org and install it into your system.

Or use Chocolatey to install it sliently.

In some cases, after nodejs is installed, when you use npm to install some packages, it could be built from source codes against your system.

Under Windows, you have to install a C++ compiler and Python 2.7(Python 3.3 is not support).

  1. You can install windows-build-tools via npm command line.

    npm install -g windows-build-tools
    
  2. Install these dependencies manually.

    • Install Visual C++ Build Tools, or Visual Studio 2015 or 2017, please make sure checkbox of C++ build tools is checked.
    • Install Python 2.7, add it in system PATH environment variable, or run npm config set python python2.7path to configure it in NPM configuration.
    • Configure msvs_version, npm config set msvs_version 2015

Configure NPM mirrors

For most of Chinese users, you have to use a NPM registry mirror to get better experience.

Check this topic in stackoverflow.