とんかつ時々あんどーなつ

〜たとえ低空でも飛行していられるように〜

nodebrew 使うのやめるってよ

nodebrew をやめて asdf に移行した話

nodebrew の削除

  • nodebrew はたいてい $HOME/.nodebrew/ にインストールされているのでこれを削除するだけ
  • もうひとつ付け加えると .bash_profile などに PATH の設定をしているだろうから、それも消しておく
  • 不安な人は下記コマンドで command not found になることを確認すると OK
$ nodebrew -v

asdf の導入

  • 基本はリポジトリの README 通りに進んでいけば OK

  • asdf の使用準備ができたら、下記の手順で Node.js を入れていく

$ asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git

追加したプラグイン一覧を確認
$ asdf plugin-list

インストール可能なバージョンを確認
$ asdf list-all nodejs

現在設定してるバージョン確認
$ asdf current nodejs

指定バージョンインストール
$ asdf install nodejs 6.9.4

使用するバージョンをセット
$ asdf global nodejs 6.9.4

現在設定してるバージョン確認
$ asdf current nodejs

〜完〜