Skip to content

Instantly share code, notes, and snippets.

@rakuishi
Last active March 1, 2018 00:14
Show Gist options
  • Save rakuishi/37c93b1928cb02713bbd784f6a78f5b7 to your computer and use it in GitHub Desktop.
Save rakuishi/37c93b1928cb02713bbd784f6a78f5b7 to your computer and use it in GitHub Desktop.
Install node.js via homebrew
# 確認
$ node -v
# homebrew をインストールしていない場合
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install nodebrew
$ nodebrew -v
$ nodebrew setup
$ nodebrew install-binary v8.9.4
$ nodebrew use v8.9.4
$ echo 'export PATH=$PATH:/Users/rakuishi/.nodebrew/current/bin' >> ~/.bashrc
# ターミナルを再起動する
$ node -v
# 動かない場合は以下を追記し、ターミナルを再起動する
$ vim .bash_profile
if [ -f ~/.bashrc ] ; then
. ~/.bashrc
fi
$ node -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment