Set Up Your Development Environment
Install Node, Yarn, Xcode, and Android Studio so you can build and run React Native apps locally.
This guide covers the tools you need installed before running a React Native app on iOS or Android. It applies to any React Native project.
Quick Answer
Install Node (via nvm), enable Corepack for Yarn, install Xcode for iOS (macOS only), and install Android Studio with an SDK and emulator for Android. Verify each with a version check before opening a project.
Prerequisites
- A Mac if you plan to build for iOS. Android and web work on Windows, macOS, or Linux.
- Several GB of free disk space Xcode and Android Studio are both large.
- Admin rights on your machine, to install SDKs and command-line tools.
1. Install Node
Use a version manager rather than a global install, so you can match whatever version a given project expects.
nvm install --lts
nvm use --lts
node -v
If a project includes an .nvmrc file, run nvm use from its root to match the pinned version exactly.
2. Enable Yarn via Corepack
Corepack ships with modern Node and manages the package manager version per project.
corepack enable
corepack yarn -v
If a project uses npm or pnpm instead, use that project's package manager everywhere these guides say corepack yarn.
3. iOS Tooling (macOS only)
- Install Xcode from the Mac App Store, then open it once to accept the license and install additional components.
- Open Xcode → Settings → Locations and confirm Command Line Tools is set to your Xcode version.
- Install Bundler and CocoaPods, used to manage native iOS dependencies:
gem install bundler
4. Android Tooling
- Install Android Studio.
- Through its SDK Manager, install an Android SDK platform and at least one emulator system image.
- Export the SDK path in your shell profile:
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/platform-tools
On Windows or Linux the SDK path differs; Android Studio shows the exact location in SDK Manager.
Common Issues
nvm: command not found the nvm init lines weren't added to your shell profile, or you need to open a new terminal.
corepack: command not found your Node version predates Corepack; upgrade Node or install Yarn directly.
Xcode is installed but the command line tools aren't found open Xcode → Settings → Locations and select a Command Line Tools version from the dropdown.
Verification Checklist
node -vprints a supported version;corepack yarn -vruns without error;- Xcode opens and Command Line Tools is selected (macOS);
- Android Studio shows at least one installed SDK platform and one emulator;
adb devicesruns and lists any running emulator or connected device.