Homebrew/homebrew-core (git revision 2548c; last commit 2019-08-11)
nodenv: 1.3.0
node-build: 4.6.3
インストール
$ brew install nodenv
$ nodenv init
eval "$(nodenv init -)"
を .zshrc に追加せよ、と言ってきますので追記
$ nodenv install 12.8.0
とかで好きなバージョンを指定
$ nodenv global 12.8.0
とかで通常使用するバージョンを指定できます。
$ nodenv local 12.7.0
とかで特定ディレクトリの下で使用するバージョンを指定します。
具体的には .node-version というファイルが作られて、そこにバージョンが書かれる。
nodenv init をちょっと追ってみる
ちなみに zsh 上で
$ nodenv init -
とすると
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters