This page looks best with JavaScript enabled

Installing Latest NodeJS in Raspberry

 ·  ☕ 1 min read

Similar with golang, nodejs is available in Raspberry Pi OS distribution and you can install it with apt install nodejs, but at the time of writing this article, the latest version in distribution is 10.24.
Here I will show how to get latest stable version of nodejs for Raspberry Pi OS (armhf/arm32).

Requirements

  • Rapsberry Pi 2/3/4

Get NodeJS

Go to nodejs download page. Find latest or prefered version of nodejs. Choose ARMv7 in Linux Binaries (ARM).

Install the Archive

  • Extract nodejs archive with prefered app, in this case I use xarchiver
    note : I install it in /usr/local/lib
  • Here I add following line to $HOME/.profile file. (again, it’s easier & simple 😛)
    # Nodejs
    VERSION=v14.16.0
    DISTRO=linux-armv7l
    export PATH=/usr/local/lib/nodejs/node-$VERSION-$DISTRO/bin:$PATH
    
  • Next run . ~/.profile or restart your Pi. Then check if nodejs is installed with node -v command.

End

Thats all I can share now, next you can use nodejs to start coding or install/build software.
Good luck and thanks for reading. Don’t forget to share this article to your friends 😄

Share on

AlextraPixel
WRITTEN BY
AlextraPixel
DIY Anywhere - Share any knowledge & Experience for everyone