LoginSignup
1
1

More than 1 year has passed since last update.

nodebrew を homebrew でインストールした時のメモ

Last updated at Posted at 2017-02-11

使用状況 -v

  • monterey 12.0.1 intel
  • デフォルトのパスが変わったのね...

nodebrew

homebrewからインストール

brew install nodebrew

デフォルトシェルのチェック

echo $SHELL
  • ~/zshの場合:.zshrc
  • ~/bashの場合:.bash_profile

bashrcとzshrc、bash_profile作成

$ touch .bashrc
$ touch .bash_profile
$ touch .zshrc

bashの場合

.bashrcにパス追加

export PATH=$HOME/.nodebrew/current/bin:$PATH

.bashrcの変更を反映

source ~/.bashrc

zshの場合

.zshrc に以下のパスを追加

export PATH=$HOME/.nodebrew/current/bin:$PATH

.zshrcの変更を反映

source ~/.zshrc

nodebrewの設定

ディレクトリ作成

mkdir -p ~/.nodebrew/src

インストール可能なヴァージョンの一覧

nodebrew ls-remote

インストールしたいヴァージョン

nodebrew install v10.14.2

インストール済みリスト

nodebrew list

ヴァージョン指定して使う

nodebrew use v10.14.2

memo

反省点
.bashrcやbash_profileを直ぐに忘れてしまう...


1
1
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
1
1