Skip to content

emka.web.id

menulis pengetahuan – merekam peradaban

Menu
  • Home
  • Tutorial
  • Search
Menu

How to Install Node.js and npm on Debian 11

Posted on August 29, 2021

Node.js is an open-source, cross-platform JavaScript runtime environment for developing server-side applications.

Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

Here, we will see how to install Node.js on Debian 11.

Install Node.js on Debian

You can install Node.js using NodeSource, NVM, and Debian repository. So, follow any one of the methods you think is easier to install Node.js.

You may need to install the curl package before proceeding further.

sudo apt update && sudo apt install -y curl

Install Node.js using NodeSource

Nodesource is a leading commercial enterprise software company with a mission to build and support a sustainable open source community around Node.js, JavaScript, and NPM.

At the time of writing this article, the below versions of Node.js is available for user. You can visit the official page to find the supported Node.js versions.
v14.x (Active LTS)v12.x (Maintenance LTS)v16.x (Latest Version)v14.x (LTS)

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

v12.x (LTS)

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

v16.x

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

Install Node.js using NVM

nvm is a version manager for Node.js, and it helps us install Node.js per user and invokes it per shell. Also, it allows you to install and use multiple versions of node.js in parallel.

Install nvm by running the below command.

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

Once the nvm is installed, exit the current session and log in back to use the nvm command.

Use the below command to verify the nvm installation.

nvm -v

Output:

0.38.0

Now, you can use the nvm command to install the latest stable version of Node.js, the latest LTS version, a specific version of Node.js.

# Latest Stable Version nvm install node # Latest LTS Version nvm install --lts # Specific Version nvm install 12.22.5

Use nvm ls-remote to list the available Node.js version to install, nvm use node/–lts/ to change to another Node.js version, nvm alias default to set the default Node.js version.
Install Node.js using Debian Repository

Node.js is also available in the Debian repository, and you can install it along with npm (Node Package Manager)using the below command.

Node.js v12.x (LTS) and npm v7.5.x are available in the Debian OS repository when writing this article.

sudo apt install -y nodejs npm 

Check Node.js Installation

Check the Node.js version using the following command.

node -v

Output: (NodeJS v14.x)

v14.17.5

Check the npm version.

npm -v

Output:

6.14.14

Install Build Tools

You will need to install development tools to compile and install native addons from npm.

sudo apt install -y build-essential 

Sumber: disini

Terbaru

  • PKB Resmi Jalin Kerjasama dengan Institut Teknologi & Sains NU Kalimantan
  • Inilah Urutan Terbaru Pangkat TNI Angkatan Darat! (Update 2026)
  • Inilah Panduan Lengkap Operator Sekolah Mengelola SPTJM e-Ijazah dan Menghindari Kesalahan Fatal Data Kelulusan
  • Inilah Syarat dan Penilaian Seleksi Siswa Unggul ITB Jalur UTBK
  • Download Video Viral Guru Bahasa Inggris? Awas Berisi Virus!
  • PKB Minta Kasus C4bul Pendiri Ponpes Pati Tidak Ada Ampunan & Tuntutan Maksimal
  • Inilah Kronologi Video Viral Preman vs Sopir Di Sumedang
  • Ini Alasan UKP Pariwisata Disindir Konten Kreator Drone Gunung Rinjani
  • Inilah Kronologi Viral Video Dugaan Asusila Pegawai Disdik Pasuruan di Mobil Dinas
  • Polisi Polda Sumut Resmi Dipecat: Dari Video Viral Sampai Sidang Etik Ini Kronologinya
  • ASUS ExpertBook Ultra: Produk Flagship yang Cerminkan Kepemimpinan ASUS di Pasar Global
  • Inilah Tahapan dan Syarat Pendaftaran Beasiswa Garuda 2026 Gelombang II (25 Mei – 25 Juni 2026)
  • Ini Maksud Soal Tugas Guru Non-ASN Berakhir 2027!
  • Apa Itu Siscamling? Inilah Cara Mengaktifkan Paket Anti Spam Telkomsel
  • Sah, Nilai TKA Jadi Salah Satu Komponen Seleksi Siswa SPMB Secara Nasional 2026
  • Inilah 3 Lagi Pinjol Ilegal Menurut OJK Tahun 2026
  • Cara Login Proktor Browser OSN Mode Online, Uji Coba OSN Semua Jenjang Terbaru
  • Inilah Link Web Komunikasi OSN 2026 anbk.kemendikdasmen.go.id/osnk ANBK Kemendikdasmen untuk Simulasi
  • Inilah Jadwal Pembagian Deviden BBRI 2026, Siap-siap!
  • Ini Alasan Kenapa Followers IG Berkurang Sendiri Mei 2026?
  • Panduan Download vhd-osnk-2025_fresh versi 29.25.5.0 untuk Uji Coba OSN-K SMA SMP Sederajat 2026
  • Iniloh Syarat dan Komponen Nilai Seleksi Siswa Unggul ITB Jalur Nilai Rapor 2026/2027
  • Inilah Syarat dan Prosedur Ikut Seleksi Siswa Unggul ITB Jalur Tes Tulis 2026/2027
  • Inilah Kronologi & Latar Belakang Kasus Erin Taulany vs ART Hera: Masalah Facebook Pro?
  • Inilah Alasan Kenapa Ending Film Children of Heaven diubah di Indonesia
  • Ini Alasan Hanny Kristianto Cabut Sertifikat Mualaf Richard Lee
  • Inilah Syarat Dokumen SSU ITB 2024-2026 yang Wajib Kalian Siapkan Supaya Nggak Gagal Seleksi Administrasi
  • Inilah Episyrphus Balteatus, Lalat Unik Penyamar yang Sangat Bermanfaat bagi Taman Kalian
  • Inilah Cara Lolos Seleksi Siswa Unggul ITB Lewat Jalur Tes Tulis Biar Jadi Mahasiswa Ganesha
  • Inilah Penemuan Fosil Hadrosaurus yang Ungkap Bahwa Penyakit Langka Manusia Sudah Ada Sejak Zaman Prasejarah
  • How to build a high-performance private photo cloud with Immich and TrueNAS SCALE
  • How to Build an Endgame Local AI Agent Setup Using an 8-Node NVIDIA Cluster with 1TB Memory
  • How to Master Windows Event Logs to Level Up Your Cybersecurity Investigations and SOC Career
  • How to Build Ultra-Resilient Databases with Amazon Aurora Global Database and RDS Proxy for Maximum Uptime and Performance
  • How to Build Real-Time Personalization Systems Using AWS Agentic AI to Make Every User Feel Special
  • How to utilize Hermes Agent V0.13 Tenacity Release to build a fully autonomous AI workforce for your personal projects
  • ChatGPT 5.5 Memory Update is Insane! Here’s the Tutorial
  • How to Write Super Fast GPU Kernels in Python Using CUTLASS and JAX for Your Deep Learning Projects
  • How to set up OpenClaw and build your own local AI assistant plugins with ease
  • How to Create Stunning Cinematic AI Videos Using the New Higgsfield Canvas Node-Based Architecture
  • Apa itu Spear-Phishing via npm? Ini Pengertian dan Cara Kerjanya yang Makin Licin
  • Apa Itu Predator Spyware? Ini Pengertian dan Kontroversi Penghapusan Sanksinya
  • Mengenal Apa itu TONESHELL: Backdoor Berbahaya dari Kelompok Mustang Panda
  • Siapa itu Kelompok Hacker Silver Fox?
  • Apa itu CVE-2025-52691 SmarterMail? Celah Keamanan Paling Berbahaya Tahun 2025

©2026 emka.web.id | Design: Newspaperly WordPress Theme