Expo works locally but EAS failed to build Android Apk

I am new to expo. i developed an app which running file with expo on android but failed when running eas build -p android --profile preview
I am using window 10
Here is complete error log

Running "npm install" in the root dir of your repository 


npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated


npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated


npm WARN deprecated


stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility


npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated


npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.


npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated


npm WARN deprecated react-navigation@4.4.4: This package is no longer supported. Please use @react-navigation/native instead. See https://reactnavigation.org/docs/getting-started/ for usage guide


npm WARN deprecated chokidar@1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.


npm WARN


deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs


npm WARN deprecated


uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0


npm WARN deprecated react-native-date-ranges@2.5.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.


npm WARN


deprecated @react-native-community/masked-view@0.1.11: Repository was moved to @react-native-masked-view/masked-view


npm WARN deprecated coffee-script@1.8.0: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)


npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue


npm WARN deprecated mkdirp@0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)


npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)


npm WARN deprecated


connect@2.30.2: connect 2.x series is deprecated


npm WARN deprecated react-navigation-stack@2.10.4: This package is no longer supported. Please use @react-navigation/stack instead. See https://reactnavigation.org/docs/stack-navigator/ for usage guide


npm WARN deprecated


core-js@1.2.7: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.


npm ERR! code ENOENT


npm ERR! syscall chmod


npm ERR! path /home/expo/workingdir/build/node_modules/pod/node_modules/pm2/bin/pm2


npm ERR! errno -2


npm ERR! enoent ENOENT: no such file or directory, chmod '/home/expo/workingdir/build/node_modules/pod/node_modules/pm2/bin/pm2'


npm ERR! enoent This is related to npm not being able to find a file.


npm ERR! enoent



npm ERR! A complete log of this run can be found in:




ERR!     /home/expo/.npm/_logs/2023-04-29T16_03_08_877Z-debug-0.log

38npm exited with non-zero code: 254

Hi @contactbablu

Please run npx expo-env-info and npx expo-doctor and post the results here.

Also: npm why pod

Also, it seems like you have some old and some really old dependencies:

This one is less important, but you should switch to @react-native-masked-view/masked-view:

Please post your dependencies and devDependencies from package.json.

Hi @wodin

Thanks for your support. Below is the output of commands

npx expo-env-info
expo-env-info 1.0.5 environment info:
OS: Windows 10 10.0.19045
Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD
expo: ^47.0.13 => 47.0.13
react: 18.1.0 => 18.1.0
react-native: 0.70.8 => 0.70.8
Expo Workflow: managed

npx expo-doctor

√ Validating global prerequisites versions passed
√ Checking for incompatible packages passed
√ Checking for conflicting global packages in project passed
√ Verifying prebuild support package versions are compatible passed
√ Checking dependency versions for compatibility with the installed Expo SDK passed
√ Validating Expo Config passed
√ Checking package.json for common issues passed

Didn’t find any issues with the project!

npm why pod
pod@“^0.9.0” from the root project

Please post your dependencies and devDependencies.

Are you using pod? Is this a monorepo or something?

Hi @wodin

These are the dependencies

"dependencies": {
    "@expo/vector-icons": "^13.0.0",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/datetimepicker": "6.5.2",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-navigation/bottom-tabs": "6.3.1",
    "@react-navigation/drawer": "^6.4.1",
    "@react-navigation/elements": "1.3.3",
    "@react-navigation/material-bottom-tabs": "6.2.1",
    "@react-navigation/material-top-tabs": "6.2.1",
    "@react-navigation/native": "6.0.10",
    "@react-navigation/native-stack": "6.6.1",
    "@react-navigation/stack": "^6.3.12",
    "@rneui/themed": "^4.0.0-rc.7",
    "eas-cli": "^3.10.2",
    "expo": "^47.0.13",
    "expo-constants": "^14.0.2",
    "expo-splash-screen": "^0.17.5",
    "expo-status-bar": "~1.4.0",
    "pod": "^0.9.0",
    "react": "18.1.0",
    "react-native": "0.70.8",
    "react-native-calendars": "^1.1295.0",
    "react-native-chart-kit": "^6.12.0",
    "react-native-date-picker": "^4.2.8",
    "react-native-date-ranges": "^2.5.0",
    "react-native-gesture-handler": "~2.8.0",
    "react-native-material-menu": "^2.0.0",
    "react-native-pager-view": "6.0.1",
    "react-native-paper": "^4.12.5",
    "react-native-payments": "^0.8.4",
    "react-native-progress": "^5.0.0",
    "react-native-reanimated": "~2.12.0",
    "react-native-safe-area-context": "4.4.1",
    "react-native-screens": "~3.18.0",
    "react-native-simple-bottom-sheet": "^1.0.4",
    "react-native-swipe-list-view": "^3.2.9",
    "react-native-tab-view": "^3.0.0",
    "react-native-vector-icons": "^9.2.0",
    "react-navigation-stack": "^2.10.4"
  "devDependencies": {
    "@babel/core": "^7.12.9"

Not using pod and its not a monorepo


Remove this. It should only be installed globally. Not as a dependency. (e.g. yarn remove eas-cli or npm uninstall eas-cli depending on what you use to manage your dependencies.)

Remove this too. This is the one that’s causing the build to fail.

Also this. It was superseded by @react-navigation/stack, which you also have installed.

Nothing else jumps out at me as being problematic, but you might also want to switch the following to @react-native-masked-view/masked-view, since the “community” version is deprecated:

Sorry! for late reply actually i was trying different option.

So finally after uninstalling the package you mentioned the error changed and now its showing error like below

FAILURE: Build completed with 2 failures.
1: Task failed with an exception.


  • What went wrong:
    Execution failed for task ‘:app:bundleReleaseJsAndAssets’.

Process ‘command ‘node’’ finished with non-zero exit value 1

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
2: Task failed with an exception.


  • What went wrong:
    java.lang.StackOverflowError (no error message)
  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

  • Get more help at https://help.gradle.org
    BUILD FAILED in 3m 13s
    Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
    You can use ‘–warning-mode all’ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
    See Command-Line Interface
    Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
    Please consult deprecation warnings for more details.
    201 actionable tasks: 201 executed
    Error: Gradle build failed with unknown error. See logs for the “Run gradlew” phase for more information.


Thanks for your support. I am able to build the apk after uninstalling the plugins you suggested.

There was few error related to image but i am able to sort out.

Thanks again for your support.

1 Like