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

  • Belum Tahu? Ini Trik Checkout Tokopedia Bayar Pakai Dana Cicil Tanpa Ribet!
  • Benarkah Pinjol Akulaku Sebar Data Jika Gagal Bayar?
  • Paket Nyangkut di CRN Gateway J&T? Tidak Tahu Lokasinya? Ini Cara Mencarinya!
  • Apa itu Nomor 14055? Nomor Call Center Apa? Ini Penjelasan Lengkapnya
  • Apakah APK Lumbung Dana Penipu & Punya Debt Collector?
  • Ini Ukuran F4 dalam Aplikasi Canva
  • Cara Lapor SPT Tahunan Badan Perdagangan di Coretax 2026
  • Cara Dapetin Saldo DANA Sambil Tidur Lewat Volcano Crash, Terbukti Membayar!
  • Apakah Aplikasi Pinjaman TrustIQ Penipu/Resmi OJK?
  • Cara Menggabungkan Bukti Potong Suami-Istri di Coretax 2026
  • Inilah Cara Cepat Upload Foto Peserta TKA Sekaligus Biar Nggak Perlu Klik Satu Per Satu
  • Apa itu Aplikasi MOVA, Penipuan atau Skema Ponzi Berkedok Aplikasi Belanja?
  • Inilah Cara Menarik Saldo ReelFlick ke DANA
  • Inilah Cara Ternak Akun Mining Bitcoin Pakai Virtual Master Biar Nggak Berat dan Tetap Lancar
  • Cara Mencairkan Koin Melolo Tanpa Invite Kode
  • Cara Mencairkan Saldo Game Sumatra The Island ke e-Wallet
  • Apakah Aplikasi Pinjol AksesDana Penipu/Resmi OJK?
  • Apakah Aplikasi RupiahMaju Pinjol Penipu/Legal?
  • Apakah Aplikasi MBA Itu Ponzi/Penipuan Atau Tidak?
  • Cara Menghilangkan Iklan dari Aplikasi Melolo
  • Cara Atasi Saldo Melolo yang Gagal Cair ke Dompet Digital
  • Cara Mengatasi Kode Undangan/Invite Code Melolo Tidak Berhasil
  • Apakah Aplikasi FreeReels Penipuan?
  • Gini Caranya Nonton Drama Pendek FreeReels dan Dibayar
  • Inilah Panduan Lengkap Persiapan TKA Madrasah 2026 Biar Nggak Ketinggalan!
  • Ini Trik Supaya Gelembung Game Clear Blast Cepat Pecah dan Bisa Withdraw!
  • Cara Main Game Gold Combo, Sampai Cuan ke e-Wallet
  • Update YouTube 2026:Sekilas Tentang Inauthentic Content yang Makin Ketat
  • Inilah Cara Lapor SPT Tahunan di Coretax 2026 Biar Nggak Bingung!
  • Gak Perlu Root! Ini Cara Buka Folder Android/Data Tanpa ZArchiver di HP Android Modern
  • How to Secure Your Moltbot (ClawdBot): Security Hardening Fixes for Beginners
  • Workflows++: Open-source Tool to Automate Coding
  • MiroThinker-v1.5-30B Model Explained: Smart AI That Actually Thinks Before It Speaks
  • PentestAgent: Open-source AI Agent Framework for Blackbox Security Testing & Pentest
  • TastyIgniter: Open-source Online Restaurant System
  • Cara Membuat Pipeline RAG dengan Framework AutoRAG
  • Contoh Sourcecode OpenAI GPT-3.5 sampai GPT-5
  • Cara Mengubah Model Machine Learning Jadi API dengan FastAPI dan Docker
  • Cara Ubah Tumpukan Invoice Jadi Data JSON dengan LlamaExtract
  • Cara Buat Audio Super Realistis dengan Qwen3-TTS-Flash
  • 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