0
0

More than 1 year has passed since last update.

React 環境構築 (たまに忘れるので、備忘録)

Posted at

開発環境

・MacBook Air (2022)
・macOS Ventura (13.1)
・Apple M2

ターミナルのコマンド履歴

homebrewインストール

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

nextstepを求められたので、
表示されたままをターミナルでコマンド入力
*{ユーザー名}の部分は適宜修正するか表示されているコマンドをコピペしてください。

echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /Users/{ユーザー名}/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/{ユーザー名}/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

インストール確認

brew --version

nvm インストール

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

表示されていたコマンドそのままターミナルで入力

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

なんかやった方が良さそうなコマンド

tail -n 3  ~/.zshrc
exec $SHELL -l

nvm バージョン確認

nvm --version

node のインストール

nvm install node

nodeのバージョン確認

node -v

npmも一緒にインストールされているので、確認

npm -v

React が使えるかの動作確認

ターミナルでコマンド入力

npx create-react-app react-test

対象フォルダに移動して

cd react-test
npx start
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