Error when trying to compile managed expo app

expo-cli 6.3.10
eas-cli 3.18.2 darwin-x64
node 16.16.0
npm 8.11.0
Try to build Android apk
Project Expo Managed

Need help. My app is Expo Managed (In the root of the project there is no android directory. It’s an Expo managed workflow), I’m trying to compile using “eas build -p android --profile preview --local” or “eas build -p android --profile preview”, in both situations expo is not able to compile, but not I understand why. When my app was Expo 46 it compiled without problems, but an update was necessary, I took advantage of it and compiled it to the latest version. Since then I can’t compile my app.

I saw in a very similar topic that the problem was in the installation of NPM, which the person installed as a project dependency, but this is not my case.

I will post the LOG below, for you to help me in the analysis:

[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:2728:18: warning: the variable "DebuggerInternal" was not declared in function "__shouldPauseOnThrow"
[RUN_GRADLEW]           typeof DebuggerInternal !== 'undefined' &&
[RUN_GRADLEW]                  ^~~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:11514:7: warning: the variable "setTimeout" was not declared in function "logCapturedError"
[RUN_GRADLEW]       setTimeout(function () {
[RUN_GRADLEW]       ^~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:9474:108: warning: the variable "nativeFabricUIManager" was not declared in function "onChange"
[RUN_GRADLEW] ...lInstanceHandle ? (from && nativeFabricUIManager.setIsJSResponder(from.sta...
[RUN_GRADLEW]                               ^~~~~~~~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:10095:21: warning: the variable "clearTimeout" was not declared in anonymous function " 264#"
[RUN_GRADLEW]     cancelTimeout = clearTimeout;
[RUN_GRADLEW]                     ^~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:13845:30: warning: the variable "__REACT_DEVTOOLS_GLOBAL_HOOK__" was not declared in anonymous function " 264#"
[RUN_GRADLEW]   if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
[RUN_GRADLEW]                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:15730:5: warning: the variable "setImmediate" was not declared in function "handleResolved"
[RUN_GRADLEW]     setImmediate(function () {
[RUN_GRADLEW]     ^~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:19906:12: warning: the variable "fetch" was not declared in anonymous function " 499#"
[RUN_GRADLEW]     fetch: fetch,
[RUN_GRADLEW]            ^~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:19907:14: warning: the variable "Headers" was not declared in anonymous function " 499#"
[RUN_GRADLEW]     Headers: Headers,
[RUN_GRADLEW]              ^~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:19908:14: warning: the variable "Request" was not declared in anonymous function " 499#"
[RUN_GRADLEW]     Request: Request,
[RUN_GRADLEW]              ^~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:19909:15: warning: the variable "Response" was not declared in anonymous function " 499#"
[RUN_GRADLEW]     Response: Response
[RUN_GRADLEW]               ^~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:20066:24: warning: the variable "FileReader" was not declared in function "readBlobAsArrayBuffer"
[RUN_GRADLEW]       var reader = new FileReader();
[RUN_GRADLEW]                        ^~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:20117:36: warning: the variable "Blob" was not declared in anonymous function " 510#"
[RUN_GRADLEW]         } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
[RUN_GRADLEW]                                    ^~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:20119:40: warning: the variable "FormData" was not declared in anonymous function " 510#"
[RUN_GRADLEW]         } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
[RUN_GRADLEW]                                        ^~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:20121:44: warning: the variable "URLSearchParams" was not declared in anonymous function " 510#"
[RUN_GRADLEW] ...e if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body...
[RUN_GRADLEW]                                  ^~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:20240:26: warning: the variable "AbortController" was not declared in anonymous function " 516#"
[RUN_GRADLEW]           var ctrl = new AbortController();
[RUN_GRADLEW]                          ^~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:20373:23: warning: the variable "XMLHttpRequest" was not declared in anonymous function " 520#"
[RUN_GRADLEW]         var xhr = new XMLHttpRequest();
[RUN_GRADLEW]                       ^~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:19919:71: warning: the variable "self" was not declared in anonymous function " 502#"
[RUN_GRADLEW] ...undefined' && globalThis || typeof self !== 'undefined' && self ||
[RUN_GRADLEW]                                       ^~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:24790:27: warning: the variable "performance" was not declared in anonymous function " 711#"
[RUN_GRADLEW]   if ("object" === typeof performance && "function" === typeof performance.no...
[RUN_GRADLEW]                           ^~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:24813:26: warning: the variable "navigator" was not declared in anonymous function " 711#"
[RUN_GRADLEW]   "undefined" !== typeof navigator && undefined !== navigator.scheduling && u...
[RUN_GRADLEW]                          ^~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:24923:37: warning: the variable "MessageChannel" was not declared in anonymous function " 711#"
[RUN_GRADLEW]   };else if ("undefined" !== typeof MessageChannel) {
[RUN_GRADLEW]                                     ^~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:24938:34: warning: the variable "nativeRuntimeScheduler" was not declared in anonymous function " 711#"
[RUN_GRADLEW] ... = "undefined" !== typeof nativeRuntimeScheduler ? nativeRuntimeScheduler....
[RUN_GRADLEW]                              ^~~~~~~~~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:37519:34: warning: the variable "requestAnimationFrame" was not declared in function "start 9#"
[RUN_GRADLEW] ...    this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));
[RUN_GRADLEW]                               ^~~~~~~~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:84192:38: warning: the variable "SharedArrayBuffer" was not declared in anonymous function " 3018#"
[RUN_GRADLEW] ...aredArrayBufferCopy = typeof SharedArrayBuffer !== 'undefined' ? SharedArr...
[RUN_GRADLEW]                                 ^~~~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:84427:25: warning: the variable "Atomics" was not declared in anonymous function " 3025#"
[RUN_GRADLEW]     '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
[RUN_GRADLEW]                         ^~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:84444:38: warning: the variable "FinalizationRegistry" was not declared in anonymous function " 3025#"
[RUN_GRADLEW] ...lizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefine...
[RUN_GRADLEW]                               ^~~~~~~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:84483:25: warning: the variable "WeakRef" was not declared in anonymous function " 3025#"
[RUN_GRADLEW]     '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
[RUN_GRADLEW]                         ^~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:91577:76: warning: the variable "Buffer" was not declared in function "convertValue"
[RUN_GRADLEW] ... 'function' ? new Blob([value]) : Buffer.from(value);
[RUN_GRADLEW]                                      ^~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:92795:56: warning: the variable "btoa" was not declared in function "dispatchXhrRequest"
[RUN_GRADLEW] ...rs.set('Authorization', 'Basic ' + btoa(username + ':' + password));
[RUN_GRADLEW]                                       ^~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:94473:29: warning: Direct call to eval(), but lexical scope is not supported.
[RUN_GRADLEW]     var digito = new Number(eval(cnpj.charAt(12) + cnpj.charAt(13)));
[RUN_GRADLEW]                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:113533:25: warning: the variable "location" was not declared in function "url"
[RUN_GRADLEW]     loc = loc || typeof location !== "undefined" && location;
[RUN_GRADLEW]                         ^~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:113721:18: warning: the variable "addEventListener" was not declared in function "Socket"
[RUN_GRADLEW]       if (typeof addEventListener === "function") {
[RUN_GRADLEW]                  ^~~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:114230:22: warning: the variable "removeEventListener" was not declared in function "onClose"
[RUN_GRADLEW]           if (typeof removeEventListener === "function") {
[RUN_GRADLEW]                      ^~~~~~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:114745:16: warning: the variable "attachEvent" was not declared in anonymous function " 3710#"
[RUN_GRADLEW]     if (typeof attachEvent === "function") {
[RUN_GRADLEW]                ^~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:115013:16: warning: the variable "TransformStream" was not declared in function "createPacketEncoderStream"
[RUN_GRADLEW]     return new TransformStream({
[RUN_GRADLEW]                ^~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:115070:26: warning: the variable "TextDecoder" was not declared in function "createPacketDecoderStream"
[RUN_GRADLEW]       TEXT_DECODER = new TextDecoder();
[RUN_GRADLEW]                          ^~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:115195:28: warning: the variable "TextEncoder" was not declared in anonymous function " 3736#"
[RUN_GRADLEW]         TEXT_ENCODER = new TextEncoder();
[RUN_GRADLEW]                            ^~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:116613:20: warning: the variable "WebTransport" was not declared in function "doOpen 2#"
[RUN_GRADLEW]         if (typeof WebTransport !== "function") {
[RUN_GRADLEW]                    ^~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:118661:158: warning: the variable "File" was not declared in function "isBinary"
[RUN_GRADLEW] ...| withNativeFile && obj instanceof File;
[RUN_GRADLEW]                                       ^~~~
[RUN_GRADLEW] FAILURE: Build failed with an exception.
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] Execution failed for task ':app:mergeReleaseResources'.
[RUN_GRADLEW] > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
[RUN_GRADLEW]    > Android resource compilation failed
[RUN_GRADLEW]      ERROR:/private/var/folders/99/tt56wkw14mg_npmj5lxncfxc0000gn/T/eas-build-local-nodejs/767a0692-a106-4dc4-a423-c6e3982b270a/build/android/app/build/generated/res/createBundleReleaseJsAndAssets/drawable-mdpi/assets_images_fundoverde.png: AAPT: error: file failed to compile.
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] > Run with --stacktrace option to get the stack trace.
[RUN_GRADLEW] > Run with --info or --debug option to get more log output.
[RUN_GRADLEW] > Run with --scan to get full insights.
[RUN_GRADLEW] * Get more help at https://help.gradle.org
[RUN_GRADLEW] BUILD FAILED in 10m 38s
[RUN_GRADLEW] Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

My package,.json dependencies and anothers:

"dependencies": {
    "@react-navigation/bottom-tabs": "^6.5.8",
    "@react-navigation/native": "^6.1.7",
    "@react-navigation/stack": "^6.3.17",
    "axios": "^1.4.0",
    "expo": "~49.0.8",
    "expo-linear-gradient": "~12.3.0",
    "expo-notifications": "~0.20.1",
    "expo-print": "~12.4.2",
    "expo-status-bar": "~1.6.0",
    "expo-storage": "^48.1.0",
    "lodash": "^4.17.21",
    "moment": "^2.29.4",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.72.4",
    "react-native-gesture-handler": "~2.12.0",
    "react-native-iphone-x-helper": "^1.3.1",
    "react-native-mask-input": "^1.2.3",
    "react-native-masked-text": "^1.13.0",
    "react-native-qrcode-svg": "^6.2.0",
    "react-native-safe-area-context": "4.6.3",
    "react-native-screens": "~3.22.0",
    "react-native-svg": "13.9.0",
    "react-native-web": "~0.19.6",
    "socket.io-client": "^4.7.2"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@types/lodash": "^4.14.197",
    "@types/react": "^18.2.20",
    "@types/react-dom": "18.0.10",
    "@types/react-native-vector-icons": "^6.4.14",
    "typescript": "^5.1.6"
  },
  "resolutions": {
    "expo-modules-autolinking": "~1.5.0",
    "@expo/config-plugins": "~7.2.2",
    "@expo/prebuild-config": "~6.2.4",
    "@expo/metro-config": "~0.10.0"
  },

Output of “npx expo install --fix”:

Dependencies are up to date

Output if “npx -y expo-doctor”:

Didn't find any issues with the project!

Trying to fix the error ended up going over my monthly quota of the free tier, so that’s why I’m trying local until I can remotely build again

Thank you in advance!

same issue here. Did you solve this ?

Nothing yet, friend!

Now I’m trying to make this project native to see if the issue continue. Can be dependency divergence. I think… If I get the exactly problem e the fix I return to do a feedback

1 Like

What happens if you remove the resolutions? They should not be necessary.

When I remove these entries I get an error in expo-doctor, at compile time. I will remove it and post the error here for you to view

expo-doctor-return
This is the return of “npx -y expo-doctor”

I thought putting these “resolutions” this issues can be fixed

Thinking better about this part of the error, I ended up finding it more interesting to resolve these conflicts before continuing with questions. That’s what I did, I downgraded Expo to 48.0.20 and the conflicts were resolved. Or try compiling again to see if the errors persist

It’s a workaround, but it might not work.

Basically, you have some dependencies that depend on expo-modules-autolinking@~1.5.0 and others that depend on expo-modules-autolinking@1.2.0 and you’re forcing them all to use a single version. Sometimes that works. Sometimes it breaks things.

Good plan.

I believe this is what is causing the problem:

But I think you’re in luck. expo-storage (which is not part of the Expo project, in case you didn’t know), consists only of two JavaScript files, containing a total of 30 lines of code. It appears to be pure JavaScript and does not seem to actually depend on expo@^48.0.0.

If I were you, and assuming you want to continue using it, I would just copy the code into your app and remove it from dependencies.

I didn’t know about this expo-storage one. Interesting, I’ll check it out right now, although I’ve already started compiling locally to test it out, so let’s wait and see “the next chapter’s footage”. I’m back to give feedback.

1 Like

Hello friends!

Just stopping by to get back to you. I still haven’t been able to resolve the compilation issue. I resolved the divergent dependencies caught by “expo-doctor”. I’ve already downgraded the version, upgraded too, but I still keep getting the error.
I do not know what else to do!!!

Help-me!

@edmardelima any solutions ? I’m stuck on this problem too and I don’t understand why

Hello friends, I just stumbled upon this same problem. Did anyone found any solution?
Will downgrading to expo 48 fix the errors?

run gradlew errors:

> Task :expo-modules-core:compileReleaseJavaWithJavac

[stderr] 

Note: Some input files use or override a deprecated API.

[stderr] 

Note: Recompile with -Xlint:deprecation for details.

[stderr] 

Note: Some input files use unchecked or unsafe operations.

[stderr] 

Note: Recompile with -Xlint:unchecked for details.

> Task :app:createBundleReleaseJsAndAssets

info Writing bundle output to:, /home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle

info Writing sourcemap output to:, /home/expo/workingdir/build/android/app/build/intermediates/sourcemaps/react/release/index.android.bundle.packager.map

info Done writing bundle output

info Done writing sourcemap output

> Task :expo-modules-core:bundleLibCompileToJarRelease

> Task :expo-modules-core:configureCMakeRelWithDebInfo[x86]

> Task :app:createBundleReleaseJsAndAssets

info Copying 30 asset files

info Done copying assets

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:968:42: warning: the variable "fetch" was not declared in anonymous function " 24#"

[stderr] 

      value: wrapFetchWithWindowLocation(fetch)

[stderr] 

                                         ^~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:1740:20: warning: the variable "Promise" was not declared in function "promiseMethodWrapper"

[stderr] 

        return new Promise(function (resolve, reject) {

[stderr] 

                   ^~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:2121:18: warning: the variable "DebuggerInternal" was not declared in function "__shouldPauseOnThrow"

[stderr] 

          typeof DebuggerInternal !== 'undefined' &&

[stderr] 

                 ^~~~~~~~~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:4653:5: warning: the variable "setImmediate" was not declared in function "handleResolved"

[stderr] 

    setImmediate(function () {

[stderr] 

    ^~~~~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:6096:9: warning: the variable "setTimeout" was not declared in anonymous function " 220#"

[stderr] 

        setTimeout(function () {

[stderr] 

        ^~~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:8977:14: warning: the variable "Headers" was not declared in anonymous function " 298#"

[stderr] 

    Headers: Headers,

[stderr] 

             ^~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:8978:14: warning: the variable "Request" was not declared in anonymous function " 298#"

[stderr] 

    Request: Request,

[stderr] 

             ^~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:8979:15: warning: the variable "Response" was not declared in anonymous function " 298#"

[stderr] 

    Response: Response

[stderr] 

              ^~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:9136:24: warning: the variable "FileReader" was not declared in function "readBlobAsArrayBuffer"

[stderr] 

      var reader = new FileReader();

[stderr] 

                       ^~~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:9187:36: warning: the variable "Blob" was not declared in anonymous function " 309#"

[stderr] 

        } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {

[stderr] 

                                   ^~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:9189:40: warning: the variable "FormData" was not declared in anonymous function " 309#"

[stderr] 

        } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {

[stderr] 

                                       ^~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:9191:44: warning: the variable "URLSearchParams" was not declared in anonymous function " 309#"

[stderr] 

...e if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body...

[stderr] 

                                 ^~~~~~~~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:9310:26: warning: the variable "AbortController" was not declared in anonymous function " 315#"

[stderr] 

          var ctrl = new AbortController();

[stderr] 

                         ^~~~~~~~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:9443:23: warning: the variable "XMLHttpRequest" was not declared in anonymous function " 319#"

[stderr] 

        var xhr = new XMLHttpRequest();

[stderr] 

                      ^~~~~~~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:8989:71: warning: the variable "self" was not declared in anonymous function " 301#"

[stderr] 

...undefined' && globalThis || typeof self !== 'undefined' && self ||

[stderr] 

                                      ^~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:17846:108: warning: the variable "nativeFabricUIManager" was not declared in function "onChange"

[stderr] 

...lInstanceHandle ? (from && nativeFabricUIManager.setIsJSResponder(from.sta...

[stderr] 

                              ^~~~~~~~~~~~~~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:18467:21: warning: the variable "clearTimeout" was not declared in anonymous function " 599#"

[stderr] 

    cancelTimeout = clearTimeout;

[stderr] 

                    ^~~~~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:22217:30: warning: the variable "__REACT_DEVTOOLS_GLOBAL_HOOK__" was not declared in anonymous function " 599#"

[stderr] 

  if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {

[stderr] 

                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:22325:27: warning: the variable "performance" was not declared in anonymous function " 638#"

[stderr] 

  if ("object" === typeof performance && "function" === typeof performance.no...

[stderr] 

                          ^~~~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:22348:26: warning: the variable "navigator" was not declared in anonymous function " 638#"

[stderr] 

  "undefined" !== typeof navigator && undefined !== navigator.scheduling && u...

[stderr] 

                         ^~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:22458:37: warning: the variable "MessageChannel" was not declared in anonymous function " 638#"

[stderr] 

  };else if ("undefined" !== typeof MessageChannel) {

[stderr] 

                                    ^~~~~~~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:22473:34: warning: the variable "nativeRuntimeScheduler" was not declared in anonymous function " 638#"

[stderr] 

... = "undefined" !== typeof nativeRuntimeScheduler ? nativeRuntimeScheduler....

[stderr] 

                             ^~~~~~~~~~~~~~~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:36876:34: warning: the variable "requestAnimationFrame" was not declared in function "start 9#"

[stderr] 

...    this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));

[stderr] 

                              ^~~~~~~~~~~~~~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:75466:25: warning: the variable "Atomics" was not declared in anonymous function " 2677#"

[stderr] 

    '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,

[stderr] 

                        ^~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:75483:38: warning: the variable "FinalizationRegistry" was not declared in anonymous function " 2677#"

[stderr] 

...lizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefine...

[stderr] 

                              ^~~~~~~~~~~~~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:75508:35: warning: the variable "SharedArrayBuffer" was not declared in anonymous function " 2677#"

[stderr] 

...%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined...

[stderr] 

                                ^~~~~~~~~~~~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:75522:25: warning: the variable "WeakRef" was not declared in anonymous function " 2677#"

[stderr] 

    '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,

[stderr] 

                        ^~~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:91950:76: warning: the variable "Buffer" was not declared in function "convertValue"

[stderr] 

... 'function' ? new Blob([value]) : Buffer.from(value);

[stderr] 

                                     ^~~~~~

[stderr] 

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:93181:56: warning: the variable "btoa" was not declared in function "dispatchXhrRequest"

[stderr] 

...rs.set('Authorization', 'Basic ' + btoa(username + ':' + password));

[stderr] 

   

package.json

...
  "dependencies": {
    "@expo/ngrok": "^4.1.0",
    "axios": "^1.5.1",
    "expo": "^49.0.0",
    "expo-constants": "~14.4.2",
    "expo-font": "~11.4.0",
    "expo-linking": "~5.0.2",
    "expo-router": "2.0.0",
    "expo-splash-screen": "~0.20.5",
    "expo-status-bar": "~1.6.0",
    "expo-updates": "~0.18.15",
    "react": "18.2.0",
    "react-native": "0.72.5",
    "react-native-gesture-handler": "~2.12.0",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-safe-area-context": "4.6.3",
    "react-native-screens": "~3.22.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0"
  },

I would really appreciate some help here. I don’t know what else to do.
Thank you!

I’ve tryed with a clean expo-router template and show the same errors. The difference is that the app builds correctly. So the blocking error was a different one. I’ve found an error in expo-splash-screen that have been solved in expo 49.0.6.
Upgraded and it works!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.