EAS Build fails when code is in a subdirectory
Build/Submit details page URL
https://expo.dev/accounts/saidthat/projects/saidthat/builds/e4ac4b21-bdf5-491c-988e-57d7c89548d2
Summary
EAS Android build fails when the main expo app folder is in a subdirectory of the overall project.
Basically, we have a folder structure set up like
Appname/ backendcode/ expoApp/ app.json eas.json ....etc
Managed or bare?
Managed (Dev Client)
Environment
EAS CLI 0.47.0 environment info: System: OS: macOS 12.2 Shell: 5.8 - /bin/zsh Binaries: Node: 16.13.2 - /usr/local/bin/node Yarn: 1.22.17 - /usr/local/bin/yarn npm: 8.1.2 - /usr/local/bin/npm Utilities: Git: 2.30.1 - /usr/bin/git npmPackages: expo: ~44.0.0 => 44.0.6 expo-dev-client: ~0.8.3 => 0.8.3 react: 17.0.1 => 17.0.1 react-dom: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 react-native-web: 0.17.1 => 0.17.1 npmGlobalPackages: eas-cli: 0.47.0 expo-cli: 5.1.1 Project workflow: generic
Error output
Fails in the Fix Gradlew step:
ENOENT: no such file or directory, open '/home/expo/workingdir/build/[name of our app directory]/android/gradlew'
Reproducible demo or steps to reproduce from a blank project
Setup a project like we laid out in the summary above and whatever the folder name you make the app code inside of will be in the error message.
if the app is in a subdirectory of the repository then both app.json and eas.json should also be in the subdirectory
Managed (Dev Client)
Based on diagnostic output you have a bare project, not managed. you probably ran expo prebuild or expo run:android/ios
I hit the same issue - it was resolved by deleting the android/ directory. Not sure why it worked though...
I have this same error for the last 9 hours, please how did you or do you fix this?
@kelechionyeama Open an issue, describe the problem, what commands are you running, what is your directory structure and link to the build page.
I have managed workflows i am also facing the same issue
i have 2 sub directory for my front end and server in my repository, when i try to eas build, it said an error that the package.json is missing when its actually there, its not on my gitignore either, i reckon that the directory that is "being built" is the root directory which has no package.json, so do i need to build another directory? its frustrating
I think I solved by making sure my files where in order.
pls pls elaborate on what order??
my repository is as followed:
RepoV4 >Client-repo >app.json >package.json > Server -repo
im trying to eas build on the Client-repo subdirectory because that is where my package.json were, but i always encounter error saying package.json is missing when i eas build, which is why i think that the one being build was my whole "RepoV4" repository :( what do i need to do?
I think I solved by making sure my files where in order.
pls pls elaborate on what order??
my repository is as followed:
RepoV4 >Client-repo >app.json >package.json > Server -repo
im trying to eas build on the Client-repo subdirectory because that is where my package.json were, but i always encounter error saying package.json is missing when i eas build, which is why i think that the one being build was my whole "RepoV4" repository :( what do i need to do?
I think I solved by making sure my files where in order.
Just make sure everything is at the root of your project. eas files, app.json, package.json