Skip to content
Runbook

Install Node.js on Arch

Server-side JavaScript runtime, built on the V8 engine, shipped with the npm package manager.

Runtimejavascriptruntimebackendv8npm

Installation

Pacman (official repositories) · pacman
sudo pacman -S nodejs npm corepack

Arch tracks current versions closely; npm and corepack are separate packages that must be installed explicitly.

Verify the installation

Verify
node --version

Important files

TypePathDescription
config~/.npmrcUser configuration for npm (registry, proxy, authentication tokens).
binary/usr/bin/nodeRuntime executable installed by pacman.

Command-line tools

  • nodeThe JavaScript runtime.
  • npmNode.js package manager.
  • npxRuns a package binary without installing it globally.
  • corepackEnables and manages pnpm and yarn.

Uninstall

Uninstall
sudo pacman -Rs nodejs npm

Good to know

  • On Arch, npm is packaged separately from nodejs: install both.
  • Arch provides the current (non-LTS) version of Node.js; to stay on an LTS, packages such as "nodejs-lts-iron" exist in the repositories or the AUR (verify depending on the version).
  • On Arch, corepack is a separate package (it does not ship with nodejs): install it explicitly, then enable pnpm and yarn with "corepack enable".
  • Corepack was removed from Node.js core as of Node 25; on Arch it is still provided by its own "corepack" package.

Installation on Arch Linux

On Arch, node, npm, and corepack are distributed in separate packages. The command sudo pacman -S nodejs npm corepack installs all three. The executable is located in /usr/bin/node. As Arch is a rolling release distribution, the nodejs package generally tracks the current version of Node.js, which is not always an LTS.

Staying on an LTS version

If you need a specific LTS, Arch offers dedicated packages such as nodejs-lts-iron or nodejs-lts-jod (names change with each LTS cycle, verify depending on the available version). For multi-version needs, nvm or fnm remain the most flexible solution, available via the AUR.

Configuration

The user configuration for npm is stored in ~/.npmrc. On Arch, Corepack does not ship with nodejs: install the corepack package (included in the command above), then enable pnpm and yarn with corepack enable. Note that Corepack was removed from Node.js core as of Node 25, but Arch still distributes it via its own package.