色々バージョン切り替え asdf

● asdfのインストール

1.

brew install asdf

2. シェルの設定

https://asdf-vm.com/guide/getting-started.html の 「3. Install asdf」 からシェルごとの設定をコピペして実行

Bash & Homebrew (macOS) の場合は

echo -e "\n. \"$(brew --prefix asdf)/libexec/asdf.sh\"" >> ~/.bash_profile
echo -e "\n. \"$(brew --prefix asdf)/etc/bash_completion.d/asdf.bash\"" >> ~/.bash_profile

● asdf を使ってみる

インストールされているコマンドのリスト

asdf list

node.jsをインストールする

asdf plugin-add nodejs
asdf list all nodejs
asdf install nodejs 18.19.0

● グローバルで使用可能にする

asdf global nodejs 18.19.0
No.2461
02/02 10:52

edit