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

  • 0811 Kode Area Mana Ini? Fakta Penipuan atau Bukan?
  • Fitur Baru Google Phone: Tetap Portrait Saat Telepon Masuk di Android
  • Apa Keuntungan dari Badoo Premium? Ini Cara Gratis Mendapatkannya!
  • Apa itu QRIS AkuLaku?
  • Apple TV+ Umumkan Kembalinya Fitur ‘Your Friends & Neighbors’ Musim Kedua!
  • Apakah Asuransi Allianz Penipu? Hati-hati Oknum Penipuan Agen Asuransi
  • Apakah Asuransi Chubb Life: Penipuan atau Bukan?
  • iPhone Fold Terungkap! Spesifikasi Lengkap, Desain Revolusioner, dan Kamera Super Canggih!
  • Aplikasi Mini Cash: Legal atau Penipuan?
  • Inilah Cara Login EMIS 4.0 Kemenag dan Cek Syarat PPG Biar Nggak Ketinggalan Info!
  • iPhone Fold Bakal Ngegas! Baterai Terbesar Sepanjang Masa, Katanya Bocoran!
  • Goshare WhatsApp Penghasil Uang: Aman atau Penipuan? Fakta & Cara Kerjanya!
  • Samsung Galaxy S26 Ultra Bocor: Hanya Hitam dan Putih? S-Pen Juga Ikut Jadi Sorotan!
  • Sok Imut Cukur Kumis Viral di TikTok: Link Aman atau Jebakan?
  • Apakah Website Credinex: Legal atau Ilegal?
  • Cara Mengatasi Error: “Kenapa Situs Ini Tidak Dapat Dijangkau”
  • Day 1 Cukur Kumis Viral: 356 Menit Link di X dan Telegram Langsung Disorot Netizen
  • Beli HP di Shopee Aman Nggak Sih?
  • Apa itu Android Desktop Camera dari Google?
  • Notepad++ Diduga Disusupi Hacker State-sponsored!
  • Fitur Baru di Apple TV Februari 2026
  • Bilibili Legal Gak Sih? Yuk, Kupas Tuntas Soal Nonton Anime di Sana!
  • Bisakah Bayar QRIS Pakai GoPayLater?
  • Apakah Aplikasi Amar Bank Tunaiku: Legal, Penipu atau Tidak?
  • Apa itu Mac Configurator?
  • Kenapa No Token Gagal Terus? Begini Cara Memasukkan!
  • Kode Bank Terbaru 2026: Kenali Arti dan Fungsinya! Jangan Sampai Salah Transfer
  • Bahayanya ‘Kumpulan Grup Asupan Malam Hijab Lokal Bocil Indo’, Waspada Phising!
  • Kenapa Voucher Axis Gagal Terus? Ini Dia Penyebab & Cara Mengatasinya!
  • Kenapa Meta AI Nggak Muncul di WhatsApp Padahal Udah Update?
  • How to Disable AI Features in Firefox 148
  • Git 2.53: What’s New?
  • Linux From Scratch Ditches Old System V init
  • How to Maintained the SSD with TRIM
  • What is CVE-2024-21009? Microsoft Office Security Serious Bug
  • Cara Membuat Podcast dari PDF dengan NotebookLlama dan Groq
  • 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
  • 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