node.jsのインストール node.jsの最新の開発用環境をMac上に用意します。 brew install node.js node.jsはbrewでサクっとインストールすることができました。インストール後のメッセージで/usr/local/lib/node_modulesをNODE_PATHに入れろ、とのことなので~/.profile上に記述しておきます。 export NODE_PATH=/usr/local/lib/node_modules これだけの手順なので間違える余地もあまりないですが、インストールに成功すると、nodeコマンドが使えるようになります。 node -v npmのインストール node.js単体で使っても面白くないので、便利なライブラリ群を使うためnpmもインストールします。(所謂gemみたいなnode.js用のパッケージ管理システムです) npmに関しては