My Docs
BlogGithubLinkedin
Blog-Content
Blog-Content
  • Blog
  • README
    • 10. Regular Expression Matching
    • 13. Roman to Integer
    • 14. Longest Common Prefix
    • 14. Longest Common Prefix
    • 19. Remove Nth Node From End of List
    • 19. Remove Nth Node From End of List
    • 8. String to Integer (atoi)
    • Table of contents
    • All the Things You Can Do With GitHub API and Python
    • Archive
    • Articles
    • Bash Commands That Save Me Time and Frustration
    • Basic Web Development Environment Setup
    • Basic Web Development Environment Setup
    • Blog Archive
    • Blog Archive
    • Blog
    • Bookmarks
    • Cheatsheet:
    • Clock
    • Community
    • Constructor Functions
    • Content
    • Cool Github Profiles
    • Data Structures Interview
    • Docs
    • dynamic-time-warping
    • Embed Showcase
    • Es6 Features
    • Functions
    • Gatsby Paginate
    • Getting Started
    • Google Cloud
    • google-sheets-api
    • History API
    • How to install Python 2.7 on Ubuntu 20.04 LTS
    • HTML SPEC
    • index
    • Installation
    • Installing Node
    • Interactive
    • Intro To NodeJS
    • Intro To React
    • Intro To React
    • Introducing JSX
    • Introduction to npm
    • Javascript and Node
    • Javascript and Node
    • Javascript and Node
    • Javascript Interview Questions:
    • Javascript Interview Questions:
    • Javascript Practice
    • Javascript Practice
    • Javascript Practice
    • JS Fat Arrow Functions
    • Jupyter Notebooks
    • Jupyter Notebooks
    • Leetcode
    • Leetcode
    • Leetcode
    • lorem-ipsum
    • Lorem ipsum
    • Markdown
    • My Favorite VSCode Themes
    • Nature
    • New Conference
    • Node APIs With Express
    • Node APIs With Express
    • Node Buffers
    • Node Docs
    • Node Export Module
    • Node Export Module
    • Node Modules System
    • Node vs Browser
    • Overview
    • Phone Number
    • Process in Linux
    • Pull Requests
    • Python at length
    • Python Quiz
    • Python Quiz
    • Python Snippets
    • Python Snippets
    • React Class Components Demo
    • React Class Components Demo
    • React Docs
    • React In Depth
    • RECENT PROJECTS
    • RECENT PROJECTS
    • Reference
    • Resume
    • Search:
    • Semantic Versioning
    • Showcase
    • Showcase
    • Sorting Algorithms
    • Sorting Strings
    • Starter Theme
    • Starter Theme
    • The Node.js Event Loop
    • The Node.js Event Loop
    • Tools
    • Tools
    • Trouble Shooting
    • Typography
    • UI Components
    • Understanding PATH
    • Understanding PATH
    • URL:
    • Visualizing the Discrete Fourier Transform
    • Web Apis
    • Web Design
    • Web Dev Bookmarks
    • Web Developer Tools
    • What is THIS
    • What is THIS
    • where-is-npm-pack
    • with some basic knowledge of React
    • Zumzi Instant Messenger
Powered by GitBook
On this page
  • Android
  • Arch Linux
  • CentOS, Fedora and Red Hat Enterprise Linux
  • Debian and Ubuntu based Linux distributions
  • fnm
  • FreeBSD
  • Gentoo
  • IBM i
  • macOS
  • n
  • NetBSD
  • Nodenv
  • nvm
  • nvs
  • OpenBSD
  • openSUSE and SLE
  • SmartOS and illumos
  • Snap
  • Solus
  • Void Linux
  • Windows

Was this helpful?

Edit on GitHub
  1. README

Installing Node

PreviousInstallationNextInteractive

Last updated 3 years ago

Was this helpful?

Android

Android support is still experimental in Node.js, so precompiled binaries are not yet provided by Node.js developers.

However, there are some third-party solutions. For example, community provides terminal emulator and Linux environment for Android, as well as own package manager and of many precompiled applications. This command in Termux app will install the last available Node.js version:

pkg install nodejs

Currently, Termux Node.js binaries are linked against system-icu (depending on libicu package).

Arch Linux

Node.js and npm packages are available in the Community Repository.

pacman -S nodejs npm

CentOS, Fedora and Red Hat Enterprise Linux

Node.js is available as a module called nodejs in CentOS/RHEL 8 and Fedora.

dnf module install nodejs:<stream>

where <stream> corresponds to the major version of Node.js. To see a list of available streams:

dnf module list nodejs

For example, to install Node.js 12:

dnf module install nodejs:12

For CentOS/RHEL 7 Node.js is available via .

Alternatives

These resources provide packages compatible with CentOS, Fedora, and RHEL.

Debian and Ubuntu based Linux distributions

Alternatives

fnm

fnm has cross-platform support (macOS, Windows, Linux) & all popular shells (Bash, Zsh, Fish, PowerShell, Windows Command Line Prompt). fnm is built with speed in mind and compatibility support for .node-version and .nvmrc files.

FreeBSD

pkg install node
cd /usr/ports/www/node && make install

Gentoo

Node.js is available in the portage tree.

emerge nodejs

IBM i

To install Node.js 14.x from the command line, run the following as a user with *ALLOBJ special authority:

yum install nodejs14

macOS

If you want to download the package with bash:

curl "https://nodejs.org/dist/latest/node-${VERSION:-$(wget -qO- https://nodejs.org/dist/latest/ | sed -nE 's|.*>node-(.*)\.pkg</a>.*|\1|p')}.pkg" > "$HOME/Downloads/node-latest.pkg" && sudo installer -store -pkg "$HOME/Downloads/node-latest.pkg" -target "/"

Alternatives

brew install node
port install nodejs<major version>

# Example
port install nodejs7

Install the binary package:

pkgin -y install nodejs

Or build manually from pkgsrc:

cd pkgsrc/lang/nodejs && bmake install

n

n is a simple to use Node.js version manager for Mac and Linux. Specify the target version to install using a rich syntax, or select from a menu of previously downloaded versions. The versions are installed system-wide or user-wide, and for more targeted use you can run a version directly from the cached downloads.

If you already have npm then installing n and then the newest LTS node version is as simple as:

npm install -g n
n lts

NetBSD

Node.js is available in the pkgsrc tree:

cd /usr/pkgsrc/lang/nodejs && make install

Or install a binary package (if available for your platform) using pkgin:

pkgin -y install nodejs

Nodenv

nodenv is a lightweight node version manager, similar to nvm. It's simple and predictable. A rich plugin ecosystem lets you tailor it to suit your needs. Use nodenv to pick a Node version for your application and guarantee that your development environment matches production.

nvm

env VERSION=`python tools/getnodeversion.py` make install DESTDIR=`nvm_version_path v$VERSION` PREFIX=""

After this you can use nvm to switch between released versions and versions built from source. For example, if the version of Node.js is v8.0.0-pre:

nvm use 8

Once the official release is out you will want to uninstall the version built from source:

nvm uninstall 8

nvs

Windows

The nvs version manager is cross-platform and can be used on Windows, macOS, and Unix-like systems

You can also use chocolatey to install it:

choco install nvs

macOS,UnixLike

Usage

After this you can use nvs to switch between different versions of node.

To add the latest version of node:

nvs add latest

Or to add the latest LTS version of node:

nvs add lts

Then run the nvs use command to add a version of node to your PATH for the current shell:

$ nvs use lts
PATH -= %LOCALAPPDATA%\nvs\default
PATH += %LOCALAPPDATA%\nvs\node\14.17.0\x64

To add it to PATH permanently, use nvs link:

nvs link lts

OpenBSD

Node.js is available through the ports system.

/usr/ports/lang/node
pkg_add node

openSUSE and SLE

Node.js is available in the main repositories under the following packages:

  • openSUSE Leap 15.2: nodejs10, nodejs12, nodejs14

  • openSUSE Tumbleweed: nodejs16

For example, to install Node.js 14.x on openSUSE Leap 15.2, run the following as root:

zypper install nodejs14

Different major versions of Node can be installed and used concurrently.

SmartOS and illumos

pkgin -y install nodejs

Or build manually from pkgsrc:

cd pkgsrc/lang/nodejs && bmake install

Snap

Solus

Solus provides Node.js in its main repository.

sudo eopkg install nodejs

Void Linux

Void Linux ships Node.js stable in the main repository.

xbps-install -Sy nodejs

Windows

Alternatives

cinst nodejs
# or for full install with npm
cinst nodejs.install
scoop install nodejs

maintained and supported at

maintained and supported by

are available from NodeSource.

Packages compatible with Debian and Ubuntu based Linux distributions are available via .

Fast and simple Node.js version manager built in Rust used to manage multiple released Node.js versions. It allows you to perform operations like install, uninstall, switch Node versions automatically based on the current directory, etc. To install fnm, use this .

The most recent release of Node.js is available via the port.

Install a binary package via :

Or compile it on your own using :

LTS versions of Node.js are available from IBM, and are available via . The package name is nodejs followed by the major version number (for instance, nodejs12, nodejs14 etc)

Node.js can also be installed with the IBM i Access Client Solutions product. See for more details

Download the directly from the web site.

Using :

Using :

Using :

See the for install methods (boostrap, npm, Homebrew, third-party), and all the usage details.

Nodenv installation instructions are maintained . Please visit that page to ensure you're following the latest version of the installation steps.

Node Version Manager is a bash script used to manage multiple released Node.js versions. It allows you to perform operations like install, uninstall, switch version, etc. To install nvm, use this .

On Unix / OS X systems Node.js built from source can be installed using by installing into the location that nvm expects:

To install nvs on Windows go to the here and download the MSI installer file of the latest release.

You can find the documentation regarding the installation steps of nvs in macOS/Unix-like systems

Using on OpenBSD:

SUSE Linux Enterprise Server (SLES) 12: nodejs10, nodejs12, and nodejs14 (The "Web and Scripting Module" must be .)

SUSE Linux Enterprise Server (SLES) 15 SP2: nodejs10, nodejs12, and nodejs14 (The "Web and Scripting Module" must be .)

SmartOS images come with pkgsrc pre-installed. On other illumos distributions, first install , then you may install the binary package as normal:

are available as on the Snap store.

Download the directly from the web site.

Using :

Using :

Termux
extensive collection
Software Collections
Node.js snaps
https://github.com/nodejs/snap
Node.js binary distributions
NodeSource
Node.js binary distributions
Node.js snaps
install script
www/node
pkg
ports
the 'yum' package manager
this support document
macOS Installer
nodejs.org
Homebrew
MacPorts
pkgsrc
homepage
on its Github page
install script
nvm
release page
here
pkg_add
enabled
enabled
pkgsrc
Node.js snaps
node
Windows Installer
nodejs.org
Chocolatey
Scoop