Upstart

Thoughts on building software and startups.

MOBYCAST
A weekly podcast about cloud native development, AWS, and building distributed systems.

Tags


Easily switch between multiple versions of Node.js

For a while, Node.js was relatively static (and serialized) with its versioning. For example, Node.js remained on version 0.10.X for about 18 months. There wasn't much need to have multiple versions of Node.js installed on the same machine, so installing and maintaining Node.js with your favorite package manager - like homebrew - worked quite well.

However, once Node.js moved beyond 0.10 to 0.12, things got quite a bit more complicated. With version 0.12 of Node.js, there were several breaking changes that made upgrading from 0.10 to 0.12 non-trivial.

Then the io.js group formed, spurring even more rapid updates and innovation. Soon new versions of Node.js came faster than ever before. Now, we find that the latest stable version of Node has progressed through several major versions to 6.7.0.

If you are like me and have been using Node.js for more than a couple of years, you likely have a significant amount of code written for older versions of Node.js. I find myself needing to run older versions of Node.js for legacy compatibility, while using newer versions of Node.js for new development projects. So I now have a very real need for being able to quickly switch between multiple versions of Node.js. And that's where package managers like homebrew don't quite fit the bill.

Enter nvm (Node Version Manager). nvm was built expressly for this use case. It allows you to quickly and easily switch among multiple versions of Node.js. Installation and configuration is very simple, and it simply just works. I highly recommend you give it a try.

Entrepreneur, technologist and startup junkie. Founded two companies, one with $24M in VC, the other bootstrapped with a SBA loan. Now building startup #3, looking to shake up the podcasting industry.

View Comments