React Native App Dependencies
Instamobile apps include the dependencies needed to run the purchased app, plus optional modules for features such as Firebase, media upload, maps, push notifications, payments, chat, and video calls.
Quick Answer
Use the dependency versions shipped with the app first. Run corepack enable, install with corepack yarn install --immutable, install iOS pods
with Bundler/CocoaPods, and only upgrade packages after the app already builds
on your machine.
Do not delete dependencies just because a feature looks unused. Some packages are loaded by native autolinking, feature flags, platform files, or reusable core modules.
Dependency Files
| File | Purpose |
|---|---|
package.json | Declares JavaScript and React Native packages, app commands, and package manager version. |
yarn.lock | Locks exact JavaScript dependency versions. Keep this file committed. |
ios/Podfile | Declares native iOS pods and React Native/Expo autolinking behavior. |
ios/Podfile.lock | Locks native iOS dependency versions after pod install. |
android/build.gradle | Declares top-level Android build plugins and repositories. |
android/app/build.gradle | Declares app-level Android config, flavors, signing, and native dependencies. |
react-native.config.js | Controls React Native autolinking and assets. |
metro.config.js | Controls bundling and module resolution. |
babel.config.js | Controls JavaScript transforms and React Native/Expo plugins. |
Install Dependencies
From the React Native app folder:
corepack enable
corepack yarn install --immutable
For iOS:
bundle install
bundle exec pod install --project-directory=ios
For Android, install Android Studio and SDKs first, then run:
corepack yarn android
Why Some React Native Apps Use Expo Modules
Instamobile React Native CLI apps can use Expo SDK modules inside a native React Native project. This is common for features such as:
- image picker
- camera
- file system
- localization
- document picker
- video/audio utilities
- splash screen
- notifications
These modules are installed like regular React Native dependencies and linked
through the native iOS and Android projects. You still build and run the app with
React Native CLI commands such as corepack yarn ios and corepack yarn android.
Common Dependency Groups
| Group | Examples | Used for |
|---|---|---|
| React Native core | react, react-native, Metro, Babel, React Native CLI | Mobile runtime and build tooling. |
| Navigation | @react-navigation/*, react-native-screens, react-native-safe-area-context | Stack, tab, drawer, and screen transitions. |
| Expo modules | expo-image-picker, expo-camera, expo-file-system, expo-localization | Native utilities used inside React Native CLI apps. |
| Firebase | @react-native-firebase/app, Auth, Firestore, Functions, Messaging | Authentication, data, backend calls, push notifications. |
| UI and gestures | react-native-gesture-handler, react-native-reanimated, react-native-svg | Interactive UI, animation, icons, charts, and gestures. |
| Media | camera roll, image picker, video, thumbnails, upload helpers | Photos, videos, post composer, profile images. |
| Maps and location | react-native-maps, geolocation, places autocomplete | Listings, taxi, delivery, store locator, real estate. |
| Payments | Stripe, PayPal/Braintree helpers, in-app purchases | Checkout, subscriptions, marketplace payments. |
| Chat and calls | chat core modules, WebRTC, Twilio, CallKeep, push notification modules | Messaging, video calls, VoIP flows. |
Not every app uses every group. Larger app packages may include more packages because they include multiple feature families.
Native Dependencies
React Native packages often include native code. That means changing dependencies may require:
- reinstalling iOS pods;
- cleaning Xcode derived data;
- rebuilding the Android app;
- checking Android SDK/NDK compatibility;
- updating iOS permissions or Android manifest entries;
- verifying autolinking.
After adding, removing, or upgrading a native package, run:
corepack yarn install --immutable
bundle exec pod install --project-directory=ios
corepack yarn ios
corepack yarn android
Upgrade Rules
Follow these rules before upgrading dependencies:
- Build the original app first.
- Commit or copy the working state.
- Upgrade one package family at a time.
- Check the package release notes for React Native version compatibility.
- Reinstall pods after native package changes.
- Run iOS and Android builds.
- Test the feature that uses the package.
Avoid broad upgrades such as:
corepack yarn up '*'
Avoid broad upgrades like this unless you have checked the compatibility matrix. They can move React Native, Expo modules, native plugins, and transitive packages outside the version matrix expected by the app.
Troubleshooting
Yarn install fails
Check your Node version and package manager:
node --version
corepack enable
corepack yarn --version
If the app package includes an .nvmrc, use it:
nvm use
iOS pods fail after changing dependencies
Run pod install from a clean state:
cd ios
bundle exec pod install
cd ..
If the error mentions an incompatible native package, check that package's React Native compatibility and iOS deployment target.
Android fails after adding a native package
Open Android Studio and check:
- Android SDK version;
- Gradle sync errors;
- missing permissions;
- package namespace conflicts;
- Java/Kotlin compatibility.
Then rerun:
corepack yarn android
A package is installed but the app cannot import it
Restart Metro with a clean cache:
corepack yarn start --reset-cache
If the package includes native code, rebuild the app as well.
FAQ
Can I remove dependencies I do not use?
Yes, but only after confirming the feature is not used by JavaScript imports, native files, feature flags, or backend flows. Remove one package at a time and run the app on both platforms.
Should I upgrade React Native immediately?
No. First run the app with the shipped versions. Upgrade React Native only when you also update the compatible Expo modules, React Navigation, native plugins, Android config, and iOS pods.
Why does a React Native CLI app include Expo packages?
Expo packages can be used as native modules inside React Native CLI apps. They provide stable APIs for camera, image picking, files, localization, splash screen, and other device features.
Should I commit lockfiles?
Yes. Commit yarn.lock and, for iOS projects, keep Podfile.lock when it is
included in the app package. Lockfiles make builds reproducible across machines.