0
0

More than 1 year has passed since last update.

Mac[M1] Node.js環境構築

Last updated at Posted at 2022-11-05

はじめに

この記事は、こちら動画を参考にしています。
動画の書き置きメモのような記事になります。

目次

  1. Nodebrewインストール
  2. パスを通す
  3. 使い方

1. Nodebrewインストール

Node.jsのバージョンを管理するものです。
様々なバージョンを利用するらしいので、

上記のサイトから以下のような手順でインストールしていきます。

ターミナル(zsh)
curl -L git.io/nodebrew | perl - setup # インストール
#...
#========================================
#Export a path to nodebrew:
#
#export PATH=$HOME/.nodebrew/current/bin:$PATH
#========================================
export PATH=$HOME/.nodebrew/current/bin:$PATH #パスを通す
nodebrew install-binary stable #安定バーションをダウンロード
#...
#Installed successfully
nodebrew ls #ダウンロードしたバージョンを確認
#v18.12.1
nodebrew use <バージョン(例:v18.12.1)> #バージョン指定
#use v18.12.1
node -v #Node.jsバージョン確認
#v18.12.1

2. パスを通す

ちなみに、これだとターミナルのデフォルトでパスが通っていません。なのでパスを通していくんですが、ややこしいので以下の動画を見てみてください。

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