0
0

More than 1 year has passed since last update.

【2023年版】asdf でnodejs12系のインストール手順 ( zsh + homebrew )

Posted at

実行環境

OS macOS Ventura 13.5
shell zsh 5.8.1 (x86_64-apple-darwin21.0)
middleware homebrew(4.1.5)
asdf(v0.11.3)

本記事で得られる結果

  • nodejs12系の実行環境

参考資料

GitHub - asdf-vm/asdf-nodejs: Node.js plugin for asdf version manager

事前準備

  • Homebrewがインストール済みであること

  • asdfがインストール済みであること

手順

  1. nodejsのインストールにはasdfのプラグインが必要

    1-1. 今回はasdf-nodejsをインストールする必要がある

  2. asdf-nodejsが依存しているツール群のインストール

    brew install gpg gawk
    

    Note: 適宜PATHを通す必要があるものは実施してください。

  3. asdf-nodejsのインストール

    asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
    
  4. インストール可能なnodejsバージョンの確認

    asdf list all nodejs
    
  5. nodejsのインストール

    asdf install nodejs 12.22.12
    
  6. nodejsの適用

    asdf global nodejs 12.22.12
    
  7. nodejsのバージョン確認

    node -v
    v12.22.12
    

おまけ

  1. npmバージョン確認

    npm -v
    6.14.16
    
  2. yarnのインストール

    $ npm install --global yarn
    
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0