Node.js — Installing Node.js via package manager (2024)

Package ManagerPrebuilt InstallerPrebuilt BinariesSource Code

The packages on this page are maintained and supported by their respective packagers, not the Node.js core team. Please report any issues you encounter to the package maintainer. If it turns out your issue is a bug in Node.js itself, the maintainer will report the issue upstream.

  • Alpine Linux
  • Android
  • Arch Linux
  • CentOS, Fedora and Red Hat Enterprise Linux
  • Debian and Ubuntu based Linux distributions
  • Exherbo Linux
  • fnm
  • FreeBSD
  • Gentoo
  • IBM i
  • macOS
  • n
  • NetBSD
  • Nodenv
  • nvm
  • nvs
  • OpenBSD
  • openSUSE and SLE
  • SmartOS and illumos
  • Snap
  • Solus
  • vfox
  • Void Linux
  • Windows
  • z/OS

Alpine Linux

Node.js LTS and npm packages are available in the Main Repository.

apk add nodejs npm

Node.js Current can be installed from the Community Repository.

apk add nodejs-current

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, Termux community provides terminal emulator and Linux environment for Android, as well as own package manager and extensive collection 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 18:

dnf module install nodejs:18/common

Alternatives

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

Debian and Ubuntu based Linux distributions

Node.js binary distributions are available from NodeSource.

Alternatives

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

Exherbo Linux

Node.js and npm packages are available in the arbor repository.

cave resolve -x node

fnm

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 install script.

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

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

Install a binary package via pkg:

Or compile it on your own using ports:

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

Gentoo

Node.js is available in the portage tree.

emerge nodejs

IBM i

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

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

yum install nodejs20

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

macOS

Download the macOS Installer directly from the nodejs.org web site.

If you want to download the package with bash:

curl "https://nodejs.org/dist/latest/$(curl -s https://nodejs.org/dist/latest/ | grep "pkg" | cut -d'"' -f 2)" -o "$HOME/Downloads/node-latest.pkg" && sudo installer -store -pkg "$HOME/Downloads/node-latest.pkg" -target "/"

Alternatives

Using Homebrew:

brew install node

Using MacPorts:

port install nodejs<major version># Exampleport install nodejs7

Using pkgsrc:

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 moretargeted use you can run a version directly from the cached downloads.

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

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

npm install -g nn 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.

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

nvm

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

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

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 versionsbuilt 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 builtfrom source:

nvm uninstall 8

nvs

Windows

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

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

You can also use chocolatey to install it:

choco install nvs

macOS,UnixLike

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

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 ltsPATH -= %LOCALAPPDATA%\nvs\defaultPATH += %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

Using pkg_add on OpenBSD:

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: nodejs20
  • SUSE Linux Enterprise Server (SLES) 12: nodejs10, nodejs12, and nodejs14(The "Web and Scripting Module" must be enabled.)
  • SUSE Linux Enterprise Server (SLES) 15 SP2: nodejs10, nodejs12, and nodejs14(The "Web and Scripting Module" must be enabled.)

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

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

pkgin -y install nodejs

Or build manually from pkgsrc:

cd pkgsrc/lang/nodejs && bmake install

Snap

Node.js snaps are available as node on the Snap store.

Solus

Solus provides Node.js in its main repository.

sudo eopkg install nodejs

vfox

A cross-platform(Windows, macOS, Linux) and extendable version manager.

It allows you to different versions for different projects, different versions for different shells, and switch Node versions automatically based on the current directory, etc.

It support all popular shells (Bash, Zsh, Fish, PowerShell, Clink, Cmder).

See the Quick Start for quickly using vfox, and all the usage details.

Void Linux

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

xbps-install -Sy nodejs

Windows

Download the Windows Installer directly from the nodejs.org web site.

Alternatives

Using Winget:

winget install OpenJS.NodeJS# or for LTSwinget install OpenJS.NodeJS.LTS

After running one of the two commands above, it may be necessary to restart theterminal emulator before the node CLI command becomes available.

Using Chocolatey:

cinst nodejs# or for full install with npmcinst nodejs.install

Using Scoop:

scoop install nodejs# or for LTSscoop install nodejs-lts

z/OS

IBM® SDK for Node.js - z/OS® is available in two installation formats,SMP/E and PAX. Select the installation format that applies to you:

Node.js — Installing Node.js via package manager (2024)
Top Articles
Naruto: 5 Characters 8th Gate Might Guy Could Crush (& 5 Who Would Crush Him)
Discount Broker: Definition, What They Do, Downsides, and Cost
AMC Theatre - Rent A Private Theatre (Up to 20 Guests) From $99+ (Select Theaters)
Washu Parking
Weeminuche Smoke Signal
Pangphip Application
Free Atm For Emerald Card Near Me
Hk Jockey Club Result
Green Bay Press Gazette Obituary
The Wicked Lady | Rotten Tomatoes
Dityship
Hssn Broadcasts
The Binding of Isaac
Sarpian Cat
Dr Adj Redist Cadv Prin Amex Charge
60 X 60 Christmas Tablecloths
Willam Belli's Husband
Jayah And Kimora Phone Number
Drift Boss 911
Is A Daytona Faster Than A Scat Pack
Melissababy
Reptile Expo Fayetteville Nc
Idle Skilling Ascension
Gen 50 Kjv
27 Fantastic Things to do in Lynchburg, Virginia - Happy To Be Virginia
Gopher Carts Pensacola Beach
Autotrader Bmw X5
About | Swan Medical Group
Orange Pill 44 291
Western Gold Gateway
Craigs List Stockton
Maxpreps Field Hockey
Walgreens Agrees to Pay $106.8M to Resolve Allegations It Billed the Government for Prescriptions Never Dispensed
How much does Painttool SAI costs?
Paperless Employee/Kiewit Pay Statements
2023 Nickstory
Energy Management and Control System Expert (f/m/d) for Battery Storage Systems | StudySmarter - Talents
How Much Is 10000 Nickels
Craigslist Food And Beverage Jobs Chicago
Levi Ackerman Tattoo Ideas
2017 Ford F550 Rear Axle Nut Torque Spec
Blue Beetle Showtimes Near Regal Evergreen Parkway & Rpx
Sechrest Davis Funeral Home High Point Nc
My Eschedule Greatpeople Me
The Bold and the Beautiful
Ephesians 4 Niv
Myra's Floral Princeton Wv
Research Tome Neltharus
Great Clips Virginia Center Commons
Laurel Hubbard’s Olympic dream dies under the world’s gaze
Texas Lottery Daily 4 Winning Numbers
Latest Posts
Article information

Author: Neely Ledner

Last Updated:

Views: 5492

Rating: 4.1 / 5 (62 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Neely Ledner

Birthday: 1998-06-09

Address: 443 Barrows Terrace, New Jodyberg, CO 57462-5329

Phone: +2433516856029

Job: Central Legal Facilitator

Hobby: Backpacking, Jogging, Magic, Driving, Macrame, Embroidery, Foraging

Introduction: My name is Neely Ledner, I am a bright, determined, beautiful, adventurous, adventurous, spotless, calm person who loves writing and wants to share my knowledge and understanding with you.