Installing Node.js

To install Node.js, you have several choices based on your operating system and your comfort with building from source code.

This book assumes you are using the latest stable version of Node.js 8. If you install a different version—for example, by building from the latest source code—the code examples in this book may not work. From the command line you can run node --version to see what version you have installed if you are not sure:

​ ​$ ​​node​​ ​​--version​
​ v8.0.0

One of the easiest ways to get Node.js is to download an installer from nodejs.org.[14]

Another popular option (the one that I use personally) is Node.js Version Manager (nvm).[15] If you’re using a Unix-like OS (such as Mac OS X ...

Get Node.js 8 the Right Way now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.