How to Install or Upgrade to Node.js v7 on the Raspberry Pi

node.js logoIt’s here! The Node.js Foundation has released version 7 of Node.js, an open-source, cross platform JavaScript runtime environment. Node.js provides an event-driven architecture capable of asynchronous I/O and allows us to build a gamut of software from highly scalable networked applications to CLI (Command-line Interface) applications. It’s a great fit for building IoT systems, and there’s never been a better time to get in the Node game with the Raspberry Pi!

Our friends at NodeSource host a package repository that makes installing and maintaining Node on the Raspberry Pi easy.  Keep reading to learn how to get started.

Which Version of Node.js Should I Use?

Node v7 is now the current version of Node and includes the latest features and innovations. It is stable and not considered beta, but geared toward those who want access to the latest that Node.js has to offer. It is the version I will be using going forward for developing applications and tutorials and staying up-to-date with the Node.js ecosystem. Use this version if you want to maximize your fun. 🙂

Node v6 is now the official LTS (long term support) version of Node and is recommended for most enterprises and business users for production applications. It is more conservative and focused on striking a balance of stability, performance, security, and maintainability.

Getting Node v7 Running on the Raspberry Pi

Raspberry PiIf you’re just getting started, follow my Beginner’s Guide to Installing Node.js on a Raspberry Pi (handy shortcut link: which will walk you through all of the steps including selecting Raspberry Pi hardware, and building out an awesome system including Node v7.

If you previously followed my tutorial and have Node v6 running on your Raspberry Pi, check out my post on Upgrading to more recent versions of Node.js on the Raspberry Pi. I have updated this guide to outline the steps for upgrading to Node v7.

Jump in and start installing/upgrading and have some fun! 🙂 Also, be sure to check out my Node.js IoT Tutorial Series to learn more about building applications after you have Node.js up and running on your Raspberry Pi.

Follow @thisDaveJ (Dave Johnson) on Twitter to stay up to date on the latest tutorials and tech articles.

Additional Articles

Beginner’s Guide to Installing Node.js on a Raspberry Pi
Upgrading to more recent versions of Node.js on the Raspberry Pi
Node.js IoT Tutorial Series
Using Visual Studio Code with a Raspberry Pi (Raspbian)


3 thoughts on “How to Install or Upgrade to Node.js v7 on the Raspberry Pi

    1. In looking at the r-pi-usonic npm package, I see that it has been deprecated and is no longer supported by the author so your mileage may vary, especially for newer versions of Node in the Node v7.x line. Perhaps the mmm-usonic package will work for you, but I do not own one of these sensors to test. Another option is to use the HC-SR04 ultrasonic sensor with an Arduino and use Johnny-Five on the RPi to talk to the Arduino as outlined in this article.

Leave a Reply to Dave Johnson Cancel reply

Your email address will not be published. Required fields are marked *