Open1

M3 Mac asdf install

Junichi HashimotoJunichi Hashimoto

asdfなるものをインストールしてみる

https://asdf-vm.com/

getting started

homebrewを使う人はこちらのコマンドを実行する

brew install asdf

installされているか確認する

which asdf

asdf --version
v0.14.1

Node.jsを使うにはプラグインなるものを追加する必要があるようだ

We should install dependencies first as some Plugins have post-install hooks.
いくつかのプラグインにはインストール後のフックがあるため、依存関係を最初にインストールする必要があります。

anyenvでNode.js入れてるから消す

nodenvを削除しておく必要がありそうなので消す

anyenv uninstall nodenv

メッセージが表示されるのでyを押すらしい。

消えているようだ

asdfでNode.jsをインストールしてみるか。プラグインを追加。

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

node.js install

asdf install nodejs latest

グローバルに設定する。

asdf global nodejs latest

こちらのコマンドを実行する。.asdfrcファイルが必要らしい。

echo 'legacy_version_file = yes' >> ~/.asdfrc