Skip to main content

Installing Node.js

Nar requires Node.js 20 or later to build frontend assets.


  1. Go to nodejs.org
  2. Download the LTS version (20.x or later)
  3. Run the installer

Verify:

node --version

You should see v20.x.x or higher.


Option 2: nvm (Node Version Manager)

nvm lets you install and switch between multiple Node versions.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash

Close and reopen your terminal, then:

nvm install 20
nvm use 20
nvm alias default 20

Option 3: Homebrew (macOS)

brew install node@20

npm

npm comes bundled with Node.js — no separate install needed.

npm --version

Troubleshooting

ProblemSolution
node: command not foundRestart your terminal, or check that Node is in your PATH.
Wrong Node versionUse nvm to switch: nvm use 20
Permission errors with npmDon't use sudo with npm. Fix with: sudo chown -R $(whoami) ~/.npm