Software Installation ubuntudebian beginner

Install Node.js

Install Node.js LTS via NodeSource

Overview

Install Node.js LTS via NodeSource

Commands

This will install Node.js LTS, continue?

curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs

Use Cases

Frontend/backend separated projects, Vue/React frontend deployment, Express/Koa backend.

Prerequisites

curl is installed.

FAQ

  • Version conflict → uninstall the old version first with sudo apt-get remove nodejs
  • npm permission issue → avoid using sudo for global installs, configure npm prefix
  • Install Python3
  • Install Git