Below is a walkthrough of that gets a developer working on a Mac a useable local environment.
If you are using a Mac, you should first install Xcode from the App Store. Once it is installed, open it, accept the EULA. Next you can install Xcode Commandline Developer Tools:
xcode-select --install
If you aren't on a Mac, just make sure you have a gcc compiler available on your system.
If you are running OS X High Sierra, you will need to install OpenSSL on your system to be able to use the reverse proxy. You can do this with the Homebrew package manager. To install Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Now you can install OpenSSL with Homebrew:
brew install openssl
nvm is a handy utility that lets you switch between multiple Node versions without needing to mess with the base version on your computer. To install:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
source ~/.nvm
nvm install 8
nvm use 8
This might not be necessary for your system, but we may as well globally install the node-gyp for compiline native add-ons.
npm install -g node-gyp
Now, you have a sturdy Node setup.
Yarn is an alternative package manager for Node. In this documentation, we will use yarn
instead of npm
commands. For the most part they are interchangeable. The command yarn some-script
is the same as npm run some-script
. To install:
curl -o- -L https://yarnpkg.com/install.sh | bash