MacでNode.jsの最新版をインストールします。
nodebrewインストール
homebrewでnodebrewをインストールします。
$ brew install nodebrew |
nodeの最新版をインストールする
nodebrewを使って最新版のnodejsをインストールします。
$ nodebrew install-binary latest |
バージョンを指定したい場合は以下のように指定します。
$ nodebrew ls |
インストールしたnodejsにpathが通っていないのでpathを通します。
$ echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.bash_profile |
終わり。