Learning Centre
  • Welcome
  • Install Node.js
  • Hands on with Node.js
    • Preface
    • What is Node.js
    • Node's Ecosystem
    • Simple Servers
    • Advanced Servers
    • Web Applications
    • Appendix
    • Glossary
Powered by GitBook
On this page
  • On Linux (Mac OSX, Ubuntu, Fedora, etc)
  • Preparation
  • Installation
  • On Windows

Was this helpful?

Install Node.js

PreviousWelcomeNextPreface

Last updated 6 years ago

Was this helpful?

This is Bevry's supported guide for installing on your computer as well as any other required dependencies for your particular system. This guide is Bevry's supported guide, as we've found other guides will leave you with an incorrectly configured environment causing permission errors and missing executables that are hard to track down.

On Linux (Mac OSX, Ubuntu, Fedora, etc)

Preparation

Mac Preparation

  1. Install Command Line Tools:

    xcode-select --install

    Xcode may or may not be necessary for the above command, if it fails, , and try again.

  2. Ensure correct permissions are set for /usr/local:

    sudo chown -R $USER /usr/local

APT Linux Preparation (Ubuntu)

sudo apt-get update
sudo apt-get install curl build-essential openssl libssl-dev git python

YUM Linux Preparation (Fedora)

sudo yum -y install tcsh scons gcc-c++ glibc-devel openssl-devel git python

Installation

  1. Uninstall any previous Node.js versions you may already have

  2. Install NVM by running the following in Terminal:

    git clone git://github.com/creationix/nvm.git ~/.nvm
    printf "\n\n# NVM\nif [ -s ~/.nvm/nvm.sh ]; then\n\tNVM_DIR=~/.nvm\n\tsource ~/.nvm/nvm.sh\nfi" >> ~/.bashrc
    NVM_DIR=~/.nvm
    source ~/.nvm/nvm.sh
  3. Install Node.js by running the following in Terminal:

    nvm install node
    nvm alias default node
    nvm use node

On Windows

  1. IMPORTANT. When installing, make sure you install with the option of making git available to the windows command line.

lets you install multiple versions of Node.js to your local user directory, enabling easy upgrades and version switching, without the permission troubles that are common with non-NVM setups.

Node.js
Download & Install Xcode
Node Version Manager aka NVM
Download & Install Git
Download & Install Node.js