Expo APK build fails: Dependency conflict between react and react-native versions

I’m stuck with an APK build for my Expo app. When I run eas build --platform android, I get an error about version conflicts. Here’s what’s happening:

npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! Could not resolve dependency:
npm ERR! peer react-native@"*" from [email protected]

I’ve tried npm install --force and npm install --legacy-peer-deps, but no luck. The error keeps popping up.

My package.json has [email protected] and [email protected]. It looks like Expo 52 needs a different React version.

What’s the best way to fix this? Should I downgrade React or update react-native? Or is there another solution?

Also, I’m a bit confused about the error message. What exactly does “While resolving: [email protected] Found: [email protected]” mean in this context?

Any help would be awesome. Thanks!

I’ve dealt with similar Expo build issues before. The error you’re seeing suggests a mismatch between your React version and what Expo 52 expects. Expo 52 typically works with React 18.x, not 19.0.0.

To resolve this, I’d recommend downgrading React to 18.2.0. You can do this by running:

npm install [email protected]

After that, make sure your react-native version is compatible with Expo 52. Check the Expo docs for the exact version required.

If you’re still facing issues, try clearing your npm cache and node_modules folder before reinstalling dependencies. This often helps resolve lingering conflicts.

Regarding your question about the error message, it means that during the installation process for Expo 52, the system found React 19.0.0 in your project, which isn’t compatible with the Expo version you’re trying to use.

Hope this helps you get your build working!

I’ve run into similar dependency conflicts before, and they can be a real headache. In your case, it looks like the core issue is a mismatch between your React version and what Expo 52 expects.

From my experience, Expo 52 is generally compatible with React 18.x, not 19.0.0. The error message you’re seeing essentially means that while trying to install Expo 52, it found React 19.0.0 in your project, which isn’t compatible.

Here’s what I’d suggest:

First, try downgrading React to 18.2.0. You can do this by running:

npm install [email protected]

If that doesn’t work, you might need to update your react-native version to match what Expo 52 expects. Check the Expo documentation for the exact version it requires.

If you’re still having issues after that, you might want to consider using a tool like ‘npm-check-updates’ to ensure all your dependencies are at the correct versions for Expo 52.

Remember to clear your npm cache and node_modules folder before reinstalling everything. Sometimes old dependencies can linger and cause conflicts.

Hope this helps! Let me know if you need any more clarification.

hey isaac, been there done that! expo can be a pain sometimes. looks like ur react version is too new for expo 52. try downgrading react to 18.2.0 with npm install [email protected]. if that doesnt work, maybe update react-native to match expo 52 requirements. good luck!