node.js

Installing node.js on a Mac from scratch

Every other month or so I've had the need to provision a clean Mac with a node.js development environment. I've summarized my steps here for quick reference (mostly for myself, but perhaps other people will find this useful).

1. Install Xcode from the Mac App Store.

2. Activate Xcode license: sudo xcodebuild -license

3. Install command line tools: xcode-select --install. This will bring up a prompt that asks you if you want to install the command line tools. Click "Install" to continue.

4. Download and install MacPorts

5. Use MacPorts to install node.js and node package manager: sudo port install nodejs npm

6. Use npm to install socket.io: npm install socket.io (or npm install -g socket.io to install it globally)

Category:
Syndicate content