How to install Node.js on your Raspberry Pi 2 or 3

Get Node.js on your Pi

I visited a dozen pages searching for a nice, clean and elegant way to install Node.js on my Pi and found nothing on my favor. Some sites pointed to specific, non-official Node.js versions 😔 Others talked about using the package manager vs. doing the manual install.

Boring and unproductive all the above. I had to double or triple check the official docs just to realize that what I was looking for was somehow buried under some misleading links on the Node.js Downloads page.

This is how we do it right

But I cracked it down so don't look any further. This is as alrighty as you can get. The following works for Raspberry Pi 2 (ARM Cortex-A7, v7) or 3 (ARM Cortex-A53, v8) while using Raspbian:

  1. curl -sL | sudo -E bash -
  2. sudo apt-get install -y nodejs
  3. sudo apt-get install -y build-essential

Because installing Node.js on a Pi should be more straightforward. Take care.