LoginSignup
5
6

More than 5 years have passed since last update.

MacにNode.jsのセットアップ(Homebrewは使ってはいけない)

Posted at

MacにNode.jsのセットアップをするにあたり、下記の記事が非常に参考になりますが、2017/10/13現時点でつまずいたので、インストールメモ。

結論から

下記の公式のインストール手順どおり、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
5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6