EAS build fails with gradlew Spawn ENONENT
Build/Submit details page URL
https://expo.dev/accounts/zegerdevos/projects/sugenda-front-end/builds/100f4b9f-6347-4362-a7d6-1b5411798538
Summary
When I run
eas build --platform android --profile development
it fails when I locally have already an android folder in my repo. when I delete this and run it again, the build will succeed.
BTW - your link to workflows (managed/bare) in this form has a 404
Managed or bare?
Managed
Environment
expo-env-info 1.2.2 environment info:
System:
OS: macOS 14.7.4
Shell: 5.9 - /bin/zsh
Binaries:
Node: 21.6.2 - ~/.nvm/versions/node/v21.6.2/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.2.4 - ~/.nvm/versions/node/v21.6.2/bin/npm
Watchman: 2025.03.10.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.15.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 24.0, iOS 18.0, macOS 15.0, tvOS 18.0, visionOS 2.0, watchOS 11.0
IDEs:
Android Studio: 2024.1 AI-241.18034.62.2412.12266719
Xcode: 16.0/16A242d - /usr/bin/xcodebuild
npmPackages:
expo: ~52.0.39 => 52.0.39
expo-router: ~4.0.19 => 4.0.19
react: 18.3.1 => 18.3.1
react-dom: 18.3.1 => 18.3.1
react-native: 0.76.7 => 0.76.7
react-native-web: ~0.19.13 => 0.19.13
npmGlobalPackages:
eas-cli: 15.0.15
expo-cli: 6.3.10
Expo Workflow: managed
Error output
See link to build.
Build failed
ENOENT: no such file or directory, open '/home/expo/workingdir/build/android/gradlew'
Reproducible demo or steps to reproduce from a blank project
see description
I've been getting similar message, I tried many things but nothing helped with a fix. A week ago building a project worked without any issues. No changes in project setup.
Mon, 24 Mar 2025 23:20:04 GMT ENOENT: no such file or directory, open '/home/expo/workingdir/build/android/gradlew'
Root of the issue is that I was trying to import file that did not exist inside app.confg.ts file. Make sure all files that you import there are correct. It would also be appreciated if expo can show us better error in this case.
Same error here
Same issue
Hi, did anyone figure out the issue? I tried @AVATAR197 suggestion but there are no files in my app.json/app.config.ts file that doesn't exist. @zegenerative Please let us know if you have figure out a solution.
I found same issue like this.
In my solution check on .gitignore and find this
/android
/ios
remove this line and re-build with eas build --profile development --platform android --local then work.
Why are you guys posting screenshots of the errors? It makes it difficult for others to find this issue when searching google or github.
[FIX_GRADLEW]
Error: ENOENT: no such file or directory, open '/var/folders/w0/dpsjc0t96lg1x8l_qzp2gdqh0000gn/T/eas-build-local-nodejs/769eeaa2-0a78-4a3f-8827-378442e4375c/build/android/gradlew'
Build failed
Unknown error. See logs of the Fix gradlew build phase for more information.
gradlew builds succeed
./gradlew assembleRelease
Possibly realted to https://github.com/expo/eas-cli/issues/2866
This might be helpful for anyone looking into this issue reproduce the problem. This issue happens on this repo for me.
Okay I solved this for my case. @AVATAR197 pointed me in the right direction. I did not have any files in app.json that did not exist. But my specific case I migrated from a RN CLI project to expo. I had tried to delete any packages, files and folders I did not need. I think I missed one though. I deleted a .bundle folder and now my builds pass.
Thanks @frogconn removing ./android ./ios from gitignore fixed the issue
But Still
npx expo-doctor@latest
env: load .env
env: export EXPO_PUBLIC_API_BASE EXPO_PUBLIC_ANDROID_API_BASE EXPO_PUBLIC_SERVER_SCHEME EXPO_PUBLIC_ENV EXPO_PUBLIC_GOOGLE_CLIENT_ID
14/15 checks passed. 1 checks failed. Possible issues detected:
Use the --verbose flag to see more details about passed checks.
✖ Check for app config fields that may not be synced in a non-CNG project This project contains native project folders but also has native configuration properties in app.json, indicating it is configured to use Prebuild. When the android/ios folders are present, EAS Build will not sync the following properties: scheme, orientation, icon, userInterfaceStyle, splash, notification, ios, android, plugins.
Advice: Add '/android' and '/ios' to your .gitignore file if you intend to use CNG / Prebuild. Learn more: https://docs.expo.dev/workflow/prebuild/#usage-with-eas-build
1 check failed, indicating possible issues with the project.
Tried by running expo-doctor
Still facing the same issue
Facing the same issue on a very old repo, creating a new codebase does not have the problem
Thanks @frogconn removing ./android ./ios from gitignore is fixed the issue for me
I found same issue like this.
In my solution check on .gitignore and find this
/android /iosremove this line and re-build with
eas build --profile development --platform android --localthen work.
thanks, this is very helpful
For me it helped to remove local /android folder and to run again.
This is definitely a change since eas-cli 15.x
Thanks you all. By removing /android and /ios we got something else came up with expo-doctor check failed
✖ Check for app config fields that may not be synced in a non-CNG project This project contains native project folders but also has native configuration properties in app.json, indicating it is configured to use Prebuild. When the android/ios folders are present, EAS Build will not sync the following properties: orientation, icon, scheme, userInterfaceStyle, ios, android, plugins.
Advice: Add '/android' and '/ios' to your .gitignore file if you intend to use CNG / Prebuild. Learn more: https://docs.expo.dev/workflow/prebuild/#usage-with-eas-build
1 check failed, indicating possible issues with the project.
I found same issue like this.
In my solution check on .gitignore and find this
/android /iosremove this line and re-build with
eas build --profile development --platform android --localthen work.thanks, this is very helpful
Strangely, removing android and ios folder from gitignore does fix this. Thank u.
i add /ios and /android and ALSO .vscode
Check if you have added android/ ios/ into .gitignore, if added remove these lines from .gitignore,
make sure you have ran npx expo prebuild