Node comes with npm, which lets you install the React Native command line interface.
Run the following command in a Terminal:
1
npm install -g react-native-cli
Copied!
If you get an error like Cannot find module 'npmlog', try installing npm directly: curl -0 -L https://npmjs.org/install.sh | sudo sh.
Or with yarn
1
yarn global add react-native-cli
Copied!
Note: (Ubuntu) make sure you add ~/.yarn/bin to your PATH
Expo CLI
Assuming that you have Node 10+ installed, you can use npm to install the Expo CLI command line utility:
1
npm install -g expo-cli
Copied!
Or with yarn
1
yarn global add expo-cli
Copied!
Xcode
The easiest way to install Xcode is via the Mac App Store. Installing Xcode will also install the iOS Simulator and all the necessary tools to build your iOS app.
If you have already installed Xcode on your system, make sure it is version 9.4 or newer.
Command Line Tools
You will also need to install the Xcode Command Line Tools. Open Xcode, then choose "Preferences..." from the Xcode menu. Go to the Locations panel and install the tools by selecting the most recent version in the Command Line Tools dropdown.