Skip to main content

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

FilePurpose
package.jsonDeclares JavaScript and React Native packages, app commands, and package manager version.
yarn.lockLocks exact JavaScript dependency versions. Keep this file committed.
ios/PodfileDeclares native iOS pods and React Native/Expo autolinking behavior.
ios/Podfile.lockLocks native iOS dependency versions after pod install.
android/build.gradleDeclares top-level Android build plugins and repositories.
android/app/build.gradleDeclares app-level Android config, flavors, signing, and native dependencies.
react-native.config.jsControls React Native autolinking and assets.
metro.config.jsControls bundling and module resolution.
babel.config.jsControls 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

GroupExamplesUsed for
React Native corereact, react-native, Metro, Babel, React Native CLIMobile runtime and build tooling.
Navigation@react-navigation/*, react-native-screens, react-native-safe-area-contextStack, tab, drawer, and screen transitions.
Expo modulesexpo-image-picker, expo-camera, expo-file-system, expo-localizationNative utilities used inside React Native CLI apps.
Firebase@react-native-firebase/app, Auth, Firestore, Functions, MessagingAuthentication, data, backend calls, push notifications.
UI and gesturesreact-native-gesture-handler, react-native-reanimated, react-native-svgInteractive UI, animation, icons, charts, and gestures.
Mediacamera roll, image picker, video, thumbnails, upload helpersPhotos, videos, post composer, profile images.
Maps and locationreact-native-maps, geolocation, places autocompleteListings, taxi, delivery, store locator, real estate.
PaymentsStripe, PayPal/Braintree helpers, in-app purchasesCheckout, subscriptions, marketplace payments.
Chat and callschat core modules, WebRTC, Twilio, CallKeep, push notification modulesMessaging, 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:

  1. Build the original app first.
  2. Commit or copy the working state.
  3. Upgrade one package family at a time.
  4. Check the package release notes for React Native version compatibility.
  5. Reinstall pods after native package changes.
  6. Run iOS and Android builds.
  7. 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.

Next Steps