Node.js v0.12, io.js, and the NodeSource Linux Repositories

The NodeSource Blog

You have reached the beginning of time!

Node.js v0.12, io.js, and the NodeSource Linux Repositories

A long time ago in a galaxy far, far away....

Two years ago, when Node.js v0.10 was released, Chris Lea updated his popular Ubuntu PPA and users were automatically upgraded from v0.8. Even though this was done at the encouragement of the Node.js maintainers at the time, it ended up causing a significant amount of pain for users who were not prepared for such a major change in a single apt-get upgrade.

Every time a new major version of Node.js is released, there is a period where the ecosystem needs to catch up with the changes. Many users are happy to use the unstable releases of Node.js, and this creates some pressure for package authors to maintain compatibility with the newer versions. However, there always remains a significant number of packages that are incompatible with brand new stable versions when they are released. This is particularly acute with native addons that have to adapt to a changing C++ API for Node.js, V8, and libuv.

Node.js v0.12

Node.js v0.12 is finally here! But the incubation period has been particularly long, with the v0.11 branch diverging significantly from what we have been used to in v0.10. While serious attempts have been made to keep the Node.js API stable, there are some major changes that will cause upgrade pain for some. Most notably:

  • Streams3: the hybrid old/new approach of Streams2 has gone and we now simply have "flowing" and "not flowing" streams. While the external API should remain consistent, upgrade pain may come in the form of edge-cases.
  • HTTP Agent: instead of the somewhat arbitrary limit of 5 simultaneous connections per host for the HTTP client, the limit is now Infinity, which should improve performance and predictability. Unfortunately, heavy HTTP client users will likely run in to new errors when hitting operating system limits.
  • V8: while not obvious, changes to the way V8 executes your code may leave you with unexpected behaviour. Specifically, the performance profile will have changed and changes to the garbage collector may leave you with unexpected performance changes, memory use changes and even expose some bugs previously hidden due to assumptions of how the garbage collector works (this is particularly true for native addons).
  • Native (C++) Addons: here lies the biggest pain for upgrades to Node.js v0.12. During the v0.11 development cycle, V8 had a major overhaul of its C++ API. These significant changes were the inspiration for the NAN project which provides a compatibility layer between different versions of V8.

Thanks mainly to new JavaScript features available in V8 such as generator functions, as well as simple impatience and frustration with the release cycle, large numbers of users have been opting for Node.js v0.11 for development—and some in production! This means that a large portion of the npm ecosystem is already mostly ready for v0.12. NAN has already been adopted by a majority of native addons, certainly the most popular ones, giving a much smoother path to compatibility. For this reason, upgrade pain is most likely to come in the form of slightly different behaviours or code that was designed to take advantage of quirks or edge-cases in v0.10 that have been "fixed" or changed in v0.12, streams will likely be one example of this.

io.js

The popular fork of Node.js, io.js, is a project that we have been actively involved with. Its governance model and the phenomenal community engagement it has so far garnered, particularly compared to Node.js, should be of great encouragement to anybody concerned about the future of Node.

io.js includes an even newer version of V8, currently 4.1. It will also track the stable releases of V8 by the Chromium team and allow for a much tighter relationship between Node and the V8 teams. These new versions also give us more rapid access to ES6 features as they land in V8. NodeSource has been helping to foster new connections between Node and the V8 team, largely focused around io.js and Google's desire to connect with the server-side JavaScript community.

Currently, io.js and Node.js v0.12 are much closer to each other in terms of functionality than either of them are to Node.js v0.10. An upgrade to one of these platforms will very likely be the only jump users need to make in order to be able to run on both of them. This will evolve over time, particularly in relation to the changes introduced by V8 in io.js. A summary overview of the main changes that users can expect when upgrading to io.js from Node.js v0.10 can be found in the v1.0.0 section of the io.js CHANGELOG.

The NodeSource Linux Repositories

Last year, we partnered with Chris Lea to extend his Ubuntu PPA to provide Linux binaries packaged for Ubuntu and Debian-based Linux distributions as well as Enterprise Linux and Fedora-based distributions. Details can be found on GitHub. Note that his original PPA is now deprecated and you should have already migrated to the new repository for Ubuntu.

Understandably, users are itching to get their hands on both Node.js v0.12 and io.js via their system package manager. However, NodeSource has decided to take a more cautious approach to upgrades, particularly given the huge growth in enterprise users who have very strict demands on stability. In addition, io.js has brought some more challenges in the form of minimum compiler version requirements—due to V8.

We will continue supporting users who choose to stick with Node.js v0.10 and we will be sure to give these users ample notice if there are any changes to our support policy in this regard.

Upgrading to Node.js v0.12 or io.js will be opt-in rather than opt-out or forced. If you are using our Linux distributions today, then you will continue to receive Node.js v0.10. If you wish to upgrade, you will need to change your installation method.

Installing Node.js v0.12

Our Node.js v0.12 debs are now available in i386, amd64 and armhf format for:

  • Debian 7 / stable (wheezy)
  • Debian testing (jessie)
  • Debian unstable (sid)
  • Ubuntu 12.04 LTS (Precise Pangolin)
  • Ubuntu 14.04 LTS (Trusty Tahr)
  • Ubuntu 14.10 (Utopic Unicorn)

Which will also support the corresponding releases of:

  • Linux Mint
  • Linux Mint Debian Edition
  • elementary OS
  • Trisquel
  • Other Debian and Ubuntu-based distributions

The one major version missing from this list is Ubuntu 10.04 LTS (Lucid Lynx). We don't see a high demand for Lucid and its LTS lifespan is due to end next month so we have decided not to support it beyond our v0.10 repository.

Our Node.js v0.12 repository is located at https://deb.nodesource.com/node_0.12, but you should use the setup script to activate it as it will ensure that your system is both compatible and set up properly—including installing the NodeSource GPG key.

Installing Node.js v0.12 Debian / Ubuntu repository

# Note the new setup script name for Node.js v0.12
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -

# Then install with:
sudo apt-get install -y nodejs

Installing io.js

io.js is following semver and is currently only available as a v1.x release, although it is rapidly incrementing minor versions and is already up to v1.4.x at the time of writing.

Our io.js v1.x debs are now available in i386, amd64 and armhf format for:

  • Debian testing (jessie)
  • Debian unstable (sid)
  • Ubuntu 14.04 LTS (Trusty Tahr)
  • Ubuntu 14.10 (Utopic Unicorn)

Which will also support the corresponding releases of:

  • Linux Mint
  • Linux Mint Debian Edition
  • elementary OS
  • Trisquel
  • Other Debian and Ubuntu-based distributions

Note the conspicuous lack of older versions of Ubuntu and Debian from this list. Toolchain difficulties involved in setting up repositories for these have forced our decision to defer release of these simply so we can get the recent, and more commonly used versions out now. Stay tuned for further announcements where we extend our support for additional versions. Hopefully we will soon be adding support for:

  • Debian 7 / stable (wheezy)
  • Ubuntu 12.04 LTS (Precise Pangolin)

In the future, io.js will see major-version increments and there will also likely be LTS releases that pin to a particular major/minor branch and only increment patch version. We will be releasing a repository for each of these variations with a separate setup procedure for each.

For now, we have a single release branch of io.js and it is available as https://deb.nodesource.com/iojs_1.x but you should use the setup script to activate it as it will ensure that your system is both compatible and set up properly, including installing the NodeSource GPG key.

Installing io.js 1.x Debian / Ubuntu repository

# Note the new setup script name for io.js
curl -sL https://deb.nodesource.com/setup_iojs_1.x | sudo bash -

# Then install with:
sudo apt-get install -y iojs

Node.js v0.10

Configurations already using our Node.js v0.10 repositories will continue to work without interruption. We are migrating them to a "0.10" namespace for new installations, both the repository location and the setup script name will be changing. If you are using the NodeSource repositories already, you will continue to receive updates to v0.10 without being automatically upgraded to v0.12 or io.js.

Your setup process for a new computer to use Node.js v0.10 should change to using the new v0.10 setup script:

Installing Node.js v0.10 Debian / Ubuntu repository

# Note the new setup script name for Node.js v0.10
curl -sL https://deb.nodesource.com/setup_0.10 | sudo bash -

# Then install with:
sudo apt-get install -y nodejs

NodeSource recommends that you start working on a strategy to migrate your applications and deployments from Node.js v0.10 soon. The version of V8 baked in to Node.js v0.10 is over 2 years old and lost official support from the Chrome team long ago. This alone should be a good reason to start considering an upgrade.

NodeSource Is Here to Help

If the migration from v0.10 to v0.12 or io.js is daunting, we can help. Reach out to the NodeSource sales team to schedule an Architectural Evaluation, a Performance Evaluation, or an Enterprise Support Contract. The growth in platform choices for running server-side JavaScript is exciting. NodeSource is well-placed to help you maximize your investment in the platform.

The NodeSource platform offers a high-definition view of the performance, security and behavior of Node.js applications and functions.

Start for Free