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

  • Lowongan Kerja Leader di BRI Melalui BFLP Specialist 2026, Cek Syarat Lengkapnya Di Sini!
  • Inilah Cara Ajukan KUR BSI 2026 yang Cair Hingga 500 Juta Tanpa Riba!
  • Ini Trik Supaya Pengajuan KUR BRI 2026 Kalian Cepat Disetujui!
  • Inilah Cara Mengenali Gejala Virus Nipah dan Langkah Pencegahannya
  • Spesifikasi Minimal PC untuk Game Arknights: Endfield
  • Apa itu Pengertian RSVP?
  • Inilah Kode Warna Emas/Gold di Canva
  • Ini Trik Supaya CCTV 24 Jam Nggak Bikin Kantong Jebol Karena Kuota dan Listrik!
  • Belum Tahu Apa Itu Store Associate? Inilah Tugas, Tanggung Jawab, dan Bocoran Gajinya Secara Lengkap
  • Inilah Aturan Saldo Minimal BNI Biar Rekening Kalian Nggak Hangus
  • Apakah Screenshot Story WA Ada Notifnya atau Nggak!
  • Inilah Cara Langganan YouTube Music Premium 2026 Khusus Pelajar Agar Kantong Nggak Jebol!
  • Inilah Kumpulan Ide Bio WhatsApp Keren dan Aesthetic Biar Profil Kalian Makin Hits!
  • Sering Ditolak Pinjaman? Ini Trik Supaya Nama Kalian Bersih dari Blacklist BI Checking
  • Cara Munculin Tanda Love Merah di Story IG, Ternyata Ini Rahasianya!
  • Inilah Cara Transfer DANA ke DANA Tanpa Verifikasi KTP yang Praktis dan Aman!
  • 02129187000 Nomor Apa? Simak Penjelasan Lengkap dan Cara Blokirnya Biar Nggak Terganggu Lagi
  • Sering Ditelepon 14010? Jangan Panik, Inilah Penjelasan Lengkap Mengenai Siapa Pemilik Nomor Tersebut!
  • 818 Nomor Apa, Jangan Langsung Dimatiin Kalau XL Lagi Telepon!
  • 1500597 Nomor Telepon Apa? Ini Dia Jawaban Lengkap dan Cara Menghadapinya!
  • 1500877 Nomor Apa? Ternyata Ini Pemilik Nomor yang Sering Telepon Kalian!
  • Cara Berhenti Langganan Melolo Biar Saldo Dana Nggak Terus-terusan Kepotong Otomatis!
  • Inilah Trik Mengatasi Riwayat Pendidikan yang Hilang di Info GTK Supaya Tetap Valid!
  • Inilah Cara Mengaktifkan & Mematikan Opsi Pengembang HP Samsung dengan Mudah!
  • Inilah Jam Berapa Gaji Payroll Masuk ke Rekening dan Kenapa Bisa Telat
  • Caranya Cek Nomor Kartu ATM Mandiri Lewat Email, Praktis Banget Buat Transaksi Online!
  • Gini Caranya Atasi Rombel 0 dan Siswa 0 di Info GTK, Ternyata Nggak Ribet Kok!
  • Coretax 2026: Inilah Alasan Kenapa Bukti Potong A1 Kalian Sekarang Nggak Nihil Lagi
  • Inilah Cara Atasi Masalah Akun dan Sinkron Dapodik 2026 Terbaru
  • Inilah Cara Mengatasi Notifikasi Gagal Didaftarkan Saat Mutasi Dapodik 2026
  • Spotify Introduces Group Chat Feature: Sharing Music and Podcasts with Friends Directly
  • Microsoft Will Fix Windows 11 Performance and User Experience Issues in 2026
  • Windows 11 KB5074105 Update Explained
  • Windows 11 Start Menu Resize Issues Explained
  • Definitely Not Fried Chicken Game Explained
  • Tutorial Membuat Sistem Automatic Content Recognition (ACR) untuk Deteksi Logo
  • Apa itu Google Code Wiki?
  • Cara Membuat Agen AI Otomatis untuk Laporan ESG dengan Python dan LangChain
  • Cara Membuat Pipeline RAG dengan Framework AutoRAG
  • Contoh Sourcecode OpenAI GPT-3.5 sampai GPT-5
  • 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
Beli Pemotong Rumput dengan Baterai IRONHOOF 588V Mesin Potong Rumput 88V disini https://s.shopee.co.id/70DBGTHtuJ
Beli Morning Star Kursi Gaming/Kantor disini: https://s.shopee.co.id/805iTUOPRV

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