Skip to content

Instantly share code, notes, and snippets.

@ekashida
Last active December 10, 2015 00:08
Show Gist options
  • Save ekashida/4348452 to your computer and use it in GitHub Desktop.
Save ekashida/4348452 to your computer and use it in GitHub Desktop.
Setting up git, node, npm, and a node version manager from scratch

Installation guide

Git

I used the Git OSX Installer.

Node

I used the Node.js Mac Installer to install the current version of Node. It installed to /usr/local/bin.

NPM

NPM is bundled with Node. It installed to /usr/local/bin.

n

I considered nave, nvm, and n, and settled on n due to its simplicity.

When I tried to install n with npm install -g n, I ran into a permissions problem. I followed this advice about how you shouldn't use sudo to install packages and set my user account as the owner of /usr/local instead.

To set a default n-managed node version, simply add n <version> to your bashrc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment