0Pricing
React Native Academy · 강의

Node, Expo CLI 및 시뮬레이터 설치

Node.js와 Expo CLI를 설정하고 iOS 시뮬레이터 또는 Android 에뮬레이터를 구성하여 React Native 앱을 로컬에서 실행할 수 있게 합니다.

Node, Expo CLI 및 시뮬레이터 설치은(는) CoddyKit의 무료 React Native Academy 강의입니다. 이것은 4개 중 1번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 React Native Academy 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. React Native Academy 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

Why Node.js Powers React Native

React Native runs on Node.js — it powers the Metro bundler that turns your JSX into an app. Install the LTS version for stability, ideally via the nvm version manager.

# Install nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

# Then install the latest LTS Node
nvm install --lts
nvm use --lts

# Verify installation
node --version   # e.g. v20.12.0
npm --version    # e.g. 10.5.0

Installing the Expo CLI

The Expo CLI lets you create, run, and build apps without touching native code. Pair it with the Expo Go app to scan a QR code and see your app on a real phone instantly.

# Install Expo CLI globally
npm install -g expo-cli

# Verify the installation
expo --version

# Alternatively, use npx (no global install needed)
npx create-expo-app --version

Setting Up iOS Simulator on macOS

For the iOS Simulator you need a Mac with Xcode installed. Open Xcode once to accept its license, then add the command line tools. Expo can launch a simulator with one keypress.

# Install Xcode Command Line Tools
xcode-select --install

# Open a simulator from the terminal
open -a Simulator

# List available simulator devices
xcrun simctl list devices

Setting Up Android Emulator

For Android you need Android Studio. Install the SDK and emulator, create a virtual Pixel device, and set the ANDROID_HOME variable so Expo can find everything. See the code.

# Add to ~/.zshrc or ~/.bashrc
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-tools

# Reload shell config
source ~/.zshrc

# Verify adb is found
adb --version

Understanding the Metro Bundler

Starting a project launches Metro, the bundler that watches your files and reloads instantly with Fast Refresh. If things get stale, clear its cache with the --clear flag.

# Start Metro and clear cache
npx expo start --clear

# Metro outputs a QR code and key shortcuts:
#  i → open iOS Simulator
#  a → open Android Emulator
#  r → reload the app
#  m → toggle the developer menu

Java Development Kit for Android

Android builds need a Java Development Kit — Expo recommends JDK 17. Install it, then run java --version to confirm it's on your PATH. The code installs it via Homebrew.

# Install JDK 17 via Homebrew (macOS)
brew install --cask temurin@17

# Verify Java version
java --version
# Expected: openjdk 17.x.x

# On Windows: download installer from
# https://adoptium.net/temurin/releases/

Verifying Your Full Setup

Once everything's installed, run npx expo-env-info (or react-native doctor) to scan your setup. It flags anything missing, so fix those issues before your first project.

# Check your environment with Expo
npx expo-env-info

# Or use the React Native community CLI doctor
npx react-native doctor

# Install Watchman for better file watching (macOS)
brew install watchman

Watchman: Faster File Watching

Watchman is a file-watcher from Facebook that makes Metro detect changes much faster, especially on macOS. Install it via Homebrew before you start building.

# Install Watchman on macOS
brew install watchman

# Verify installation
watchman version

# If Metro has stale Watchman state, reset it
watchman watch-del-all

Environment Variables and PATH

Many setup headaches come down to a missing PATH entry — your shell can't find adb or the emulator. Add the paths to ~/.zshrc, then reload it. The code shows exactly what.

# Example ~/.zshrc additions for React Native
export JAVA_HOME=$(/usr/libexec/java_home -v 17)
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools

# Apply changes
source ~/.zshrc

Expo Go App on a Real Device

The fastest way to test on a real phone is the Expo Go app. Run expo start, then scan the QR code, and your app loads over Wi-Fi. Perfect for quick development. 📱

# Start Expo development server
npx expo start

# Expo prints a QR code in the terminal.
# Scan it with:
#   iOS: Camera app → tap the banner
#   Android: Expo Go app → Scan QR Code

# Or press 's' to switch to Expo Go mode
# if using a dev build by default

Troubleshooting Common Setup Issues

Most setup snags are predictable: a busy port 8081, a stale Metro cache, the wrong Node version, or a missing ANDROID_HOME. And always read the red error screen carefully.

# Common fixes

# Clear Metro cache
npx expo start --clear

# Kill process on port 8081
lsof -ti:8081 | xargs kill -9

# Check connected Android devices
adb devices

# Restart adb server if devices not showing
adb kill-server
adb start-server

Quick Check

Test your understanding of React Native Mobile Development concepts from this lesson.

Lesson Recap

You built your toolchain: Node and nvm run the JavaScript, Expo CLI scaffolds and serves your app, and Watchman plus the SDKs power simulators. Next: your first project! 🎉

자주 묻는 질문

“Node, Expo CLI 및 시뮬레이터 설치” 강의는 무료인가요?

네 — “Node, Expo CLI 및 시뮬레이터 설치” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 React Native Academy 강의 전체를 잠금 해제할 수 있습니다. React Native Academy 강의에는 총 4개의 강의가 포함되어 있습니다.

“Node, Expo CLI 및 시뮬레이터 설치”에서 뭘 배우나요?

Node.js와 Expo CLI를 설정하고 iOS 시뮬레이터 또는 Android 에뮬레이터를 구성하여 React Native 앱을 로컬에서 실행할 수 있게 합니다. 브라우저에서 직접 실행하는 실습 코드로 React Native Academy을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

React Native Academy을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 React Native Academy은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 1번째 강의입니다.

“Node, Expo CLI 및 시뮬레이터 설치” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 React Native Academy 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 React Native Academy 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. Node, Expo CLI 및 시뮬레이터 설치
  2. 첫 Expo 프로젝트 만들기
  3. 기기와 에뮬레이터에서 실행하기
  4. 프로젝트 구조 이해하기
← React Native Academy(으)로 돌아가기