EAS Build Failed - npm ERR! ERESOLVE - unable to resolve dependency tree

Before posting your question, make sure you’ve read the documentation for both EAS Build & Submit.

If your Android or iOS build is failing- make sure you do your own research on the error message first before posting (this will give you a better understanding, and you might even find that someone else has already solved the issue!) It is not up to the Expo team to debug your project or build.

In your post, please share:

  • Whether you are bare or managed workflow
  • Your eas-cli version
  • What you have tried so far

Hi, this is a managed workflow.
eas-cli/0.48.2 darwin-x64 node-v16.14.2

As for what I have tried:

yarn cache clean
npm install -g eas-cli
eas build:configure > all
Npm install expo
Expo start > works.
eas build --platform android > Build error.
eas build --platform android --local > errors.
Yarn install > error Found incompatible module.
npm cache clean -f
Updated node Node.js
n stable
rm -r ./node_modules
rm ./yarn.lock
yarn install
expo install expo-dev-client
npm install --global expo-cli
Expo start > works
android - SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable - Stack Overflow
expo run:android --variant release > ERROR
android - How to set ANDROID_SDK_ROOT in mac? - Stack Overflow
exportANDROID_SDK_ROOT=/Users/dfrz/Library/Android/sdk
[expo-camera] Could not find com.google.android:cameraview:1.0.0 · Issue #3639 · expo/expo · GitHub
Edit:
What worked for me:
paste:
maven {
// expo-camera bundles a custom com.google.android:cameraview
url “$rootDir/…/node_modules/expo-camera/android/maven”
}
as the last dependency in android/build.gradle → allprojects/repositories
Previously I tried to paste it into buildscript/repositories (my mistake)
eas build --profile development --platform android
Npm install
eas build --profile development --platform android
npm install --save --legacy-peer-deps
eas build --profile development --platform android --clear-cache
eas build:inspect -p android --verbose -s pre-build -o logs3 > Worked.
eas build:inspect -p android --verbose -s post-build -o logs3 > Error

[RUN_GRADLEW] /private/var/folders/81/1kf6p8cj6qq08ljxw19xm8gc0000gn/T/eas-cli-nodejs/cea12da7-4ce5-475b-9a22-265c2102ed99/build/android/app/src/main/java/com/yoopy/app/MainApplication.java:39: error: cannot find symbol
[RUN_GRADLEW] return BuildConfig.DEBUG;
[RUN_GRADLEW] ^

import com.facebook.react.BuildConfig;

eas build --platform android --local --clear-cache

npm config set legacy-peer-deps true

This finally worked: eas build --platform android --local and got the .aab, nonetheless, when running.

eas build --platform android

Running npm in the root dir of your repository
[stderr] npm ERR!
[stderr] code ERESOLVE
[stderr] npm ERR! ERESOLVE
[stderr] unable to resolve dependency tree
[stderr] npm ERR!
[stderr] npm ERR! While resolving: frontend@1.0.0
[stderr] npm ERR! Found: react-native-web@0.13.18
[stderr] npm ERR! node_modules/react-native-web
[stderr] npm ERR! react-native-web@“~0.13.12” from the root project
[stderr] npm ERR!
[stderr] npm ERR! Could not resolve dependency:
[stderr] npm
[stderr] ERR! peer react-native-web@“^0.11” from react-native-maps@0.28.0
[stderr] npm ERR! node_modules/react-native-maps
[stderr] npm ERR! react-native-maps@“0.28.0” from the root project
[stderr] npm ERR!
[stderr] npm ERR! Fix the upstream dependency conflict, or retry
[stderr] npm ERR! this command with --force, or --legacy-peer-deps
[stderr] npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
[stderr] npm ERR!
[stderr] npm ERR! See /home/expo/.npm/eresolve-report.txt for a full report.
[stderr]
[stderr] npm ERR! A complete log of this run can be found in:
[stderr] npm ERR! /home/expo/.npm/_logs/2022-04-02T19_09_44_426Z-debug.log
npm exited with non-zero code: 1

Thank you.