【Mac】VoltaでNode.jsとYarnをインストールする
2021/08/11
今までNode.jsのバージョン管理ツールはnvmを使っていたけど、今回Macを新しく使うにあたってVoltaを使うことにしてみた
時代はVoltaらしいよ、知らんけど。
ちなみに今日からzsh使いになった。
手順
Voltaのインストール
% curl https://get.volta.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12319 100 12319 0 0 7212 0 0:00:01 0:00:01 --:--:-- 7208
Installing latest version of Volta (1.0.4)
Checking for existing Volta installation
Fetching archive for macOS, version 1.0.4
######################################################################## 100.0%#=#=-# # ######################################################################## 100.0%
Creating directory layout
Extracting Volta binaries and launchers
Finished installation. Updating user profile settings.
Updating your Volta directory. This may take a few moments...
success: Setup complete. Open a new terminal to start using Volta!% source .zshrc% volta -v
1.0.4Node.jsのインストール
% volta install node@16
Fetching node@16.6.1 [========================================] 100%
success: installed and set node@16.6.1 (with npm@7.20.3) as default
% node -v
v16.6.1Yarnのインストール
% volta install yarn
success: installed and set yarn@1.22.11 as default
% yarn -v
1.22.11