使用状況 -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を直ぐに忘れてしまう...