0
0

M1 Macで Create React App の環境構築 (Homebrew, Nodebrew, Node)

Posted at

M1 Macで Create React App の環境構築をしました。
M1 Macの仕様でかなり苦戦しました、、

Homebrew をインストール


% cd /opt
% sudo mkdir homebrew
% sudo chown $USER homebrew
% curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew

PATHを通す

# PATHを通す
% cd
% vim .zshrc

export PATH=/opt/homebrew/bin:/usr/local/bin:$PATH

% source .zshrc
% which brew
/opt/homebrew/bin/brew

Xcodeのライセンス


% sudo xcodebuild -license accept

sudo softwareupdate --install-rosetta

Homebrewとnodebrewのインストール


brew -v
brew install nodebrew
nodebrew -v

Nodeのインストール


% nodebrew ls-remote
% nodebrew setup
% nodebrew install-binary stable
% nodebrew ls
% nodebrew use

Nodeの環境パスを通す


echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.bash_profile

# または

echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.zprofile

完了!
作業環境によるので大変でした。

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