MacにNode.jsのセットアップをするにあたり、下記の記事が非常に参考になりますが、2017/10/13現時点でつまずいたので、インストールメモ。
-
でてくるツール
- Homebrew: macのパッケージ管理ソフト
- Nodebrew: Node.jsのバージョン管理ソフト
結論から
下記の公式のインストール手順どおり、Homebrewではなくcurlコマンドでインストールが必要です
$ curl -L git.io/nodebrew | perl - setup
set PATH
$ echo 'export PATH=$PATH:$HOME/.nodebrew/current/bin' >> ~/.bash_profile
$ source ~/.bash_profile
$ echo $PATH
check
$ nodebrew -v
Homebrewを使った場合
- Homebrewでnodeberewをいれると、下記エラーでnodeが入れられない。
$ nodebrew install-binary latest
〜〜
curl: (23) Failed writing body (0 != 3568)
- もし、Homebrewでnodeberewをいれてしまったら、アンインストール
$ homebrew uninstall nodebrew
$ nodebrew -v