This guide covers the essential commands needed to set up and fix common issues when starting a new React Native Expo app using the Obytes template.
Get the Obytes React Native starter template from: https://starter.obytes.com/getting-started/create-new-app/
Before starting, ensure you have these tools installed:
Essential:
For Development:
- Expo Go app - For testing on physical devices
- Android Studio - For Android emulator
- Xcode - For iOS simulator (macOS only)
Recommended:
After installing Android Studio:
-
During installation, make sure to install:
- Android SDK
- Android SDK Platform-Tools
- Android Emulator
-
Set environment variables by adding these to your shell profile (
~/.zshrc
or~/.bash_profile
):export ANDROID_HOME=$HOME/Library/Android/sdk export PATH=$PATH:$ANDROID_HOME/emulator export PATH=$PATH:$ANDROID_HOME/platform-tools
-
Restart your terminal or run:
source ~/.zshrc # or source ~/.bash_profile
-
Verify installation:
adb version
pnpm install
npx expo install --fix
cd ios && pod install && cd ..
# Fix linting issues automatically
pnpm lint --fix
# Check TypeScript types
pnpm type-check
# Run Expo doctor to check for common issues
npx expo doctor
Ensure your environment files are properly set up:
.env.development
.env.staging
.env.production
Check that APP_ENV
variable is correctly configured in your environment.
# Run comprehensive checks (lint + type-check + translations + tests)
pnpm check-all
# Start Expo development server
pnpm start
# Or for specific platforms
pnpm ios
pnpm android
pnpm web
If you encounter issues:
-
Clear caches:
npx expo start --clear
-
Reset Metro bundler:
npx react-native start --reset-cache
-
Reinstall dependencies:
rm -rf node_modules pnpm install
-
iOS specific issues:
cd ios pod deintegrate pod install cd ..
-
Android specific issues:
# Check if Android SDK is properly configured adb version # If ANDROID_HOME error persists: export ANDROID_HOME=$HOME/Library/Android/sdk export PATH=$PATH:$ANDROID_HOME/platform-tools # Alternative: Use Expo Go instead of building natively pnpm start # Then scan QR with Expo Go app
- This template uses pnpm as the package manager
- Expo Router is configured for file-based routing
- NativeWind (Tailwind CSS) is set up for styling
- React Query Kit is used for API state management
- i18next is configured for internationalization
- React Native: 0.76.6
- Expo: ~52.0.26
- TypeScript: Strict typing enabled
- Styling: NativeWind (Tailwind CSS)
- State Management: Zustand + React Query
- Navigation: Expo Router
- Internationalization: i18next