The NodeSource Blog

Announcing a Node.js Snap for Linux Users

NodeSource is excited to announce that Node.js—the popular Open Source, cross-platform JavaScript runtime environment—is now easier than ever to install on Linux thanks to a collaboration with Canonical on their Snap software distribution system.

Snaps are containerized software packages designed to work across cloud, desktop, and IoT devices. They work natively on most popular Linux distributions, feature automatic updates for users, improved security, and greater flexibility for developers working in Linux environments. Their auto-updating and transactional nature is making snaps a popular choice for the delivery of desktop applications in particular.

The Node.js snap contains the Node.js runtime, along with the widely-used package manager npm. So with a single command, developers can be up and running with their chosen version(s) of Node.js and supporting tools with no need for external repos or personal package archives (PPAs).

NodeSource already actively maintains a wildly popular comprehensive set of Linux packages for most modern Linux distributions, across all actively supported versions of Node.js. By extending our build system to include Snaps, we are able to deliver Node.js fresh to your Linux systems within hours (or minutes!) of their formal release by the Node.js project in many convenient forms.

NodeSource engineers leveraged the channels feature of the snap store when setting up the Node.js snaps, enabling us to have multiple releases of Node.js concurrently available in the store running on separate “tracks”. Users of the Node.js snap can select a track to follow and be confident that they won’t be automatically upgraded to another major release.

Installing Node.js with snap is easy:

sudo snap install node --classic --channel=8/stable

Effortlessly switch between Node.js channels at any time:

sudo snap switch node --channel=9/stable
sudo snap refresh

Users feeling adventurous or interested in testing bleeding-edge versions of Node.js can install from the latest or edge channel. This has an element of risk: it is a direct pipeline from the upstream Node.js git repository to the snap store and previews the ongoing Node.js 10 development work. This is only recommend for those users who are willing to participate in testing and bug reporting upstream:

sudo snap install node --classic --channel=edge

Please be aware that due to their auto-updating nature, Snaps are not necessarily appropriate for the deployment of your Node.js applications to production. NodeSource recommends a stable and integration-tested deployment pipeline for your Enterprise applications. However, Snaps represent an excellent way to keep developer machines updated and allow for trivial and convenient switching between Node.js versions.

N|Solid for AWS Lambda offers a high-definition view of the performance and behavior of serverless functions.

Start for Free