-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Description
Minimal reproducible example
Providing a minimal reproducible example for this issue is challenging as the error occurs during the EAS Build process on the server, not directly within the application's code. A new, bare Expo project likely builds successfully.
The issue seems to be related to how the EAS Build server processes or recognizes the android/gradlew file within the build environment for this specific project, despite npx expo prebuild --clean successfully generating the android directory locally with gradlew present.
Please refer to the detailed "Steps to reproduce" section above, which outlines the comprehensive local cleanup, environment setup, and build commands that consistently lead to this error. The EAS Build log and the provided Project ID should contain the necessary information for diagnosis.
Steps to reproduce
Cleaned local project: deleted node_modules, package-lock.json, and android folder.
Uninstalled and reinstalled Node.js (ensuring correct PATH setup via NVM).
Updated global eas-cli to 16.17.0.
Manually removed projectId from app.json.
Ran eas project:init to create a new EAS project link.
Ran npm install (output: added 10 packages).
Ran npx expo prebuild --clean (output: √ Cleared android code, √ Created native directory, √ Finished prebuild).
Attempted to build using eas build --platform android --profile production.
Expected behavior: The EAS Build should complete successfully and generate an Android APK, as the gradlew file is present in the locally prebuilt android directory and the environment is clean.
Actual Behavior: The build consistently fails during the "Fix gradlew" step with the error: ENOENT: no such file or directory, open '/home/expo/workingdir/build/android/gradlew'.
Environment
OS: Windows 11
Node.js version: v22.17.1
npm version: 11.4.2
EAS CLI version: eas-cli/16.17.0
Expo SDK version: ~53.0.17
Project ID: a47ccdb5-8a83-4112-aeec-95176e51916f
Expo Doctor Diagnostics
C:\Users\USER\Documents\Capstone_Project\SalonBookingApp> npx expo-doctor@latest
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
11/15 checks passed. 4 checks failed. Possible issues detected:
Use the --verbose flag to see more details about passed checks.
✖ Check dependencies for packages that should not be installed directly
The package "expo-firebase-recaptcha" has been removed as of SDK 48. You should use the Firebase JS SDK or React Native Firebase directly. Learn more: https://expo.fyi/firebase-migration-guide
Advice:
Remove these packages from your package.json.
✖ Check that native modules use compatible support package versions for installed Expo SDK
Expected package @expo/config-plugins@~10.1.1
Found invalid:
@expo/[email protected]
(for more info, run: npm why @expo/config-plugins)
Advice:
Upgrade dependencies that are using the invalid package versions.
✖ Validate packages against React Native Directory package metadata
The following issues were found when validating your dependencies against React Native Directory:
No metadata available: @babel/preset-env, @babel/runtime, expo-firebase-recaptcha, firebase
Advice:
Update React Native Directory to include metadata for unknown packages. Alternatively, set expo.doctor.reactNativeDirectoryCheck.listUnknownPackages in package.json to false to skip warnings about packages with no metadata, if the warning is not relevant.
✖ Check that packages match versions required by installed Expo SDK
The following packages should be updated for best compatibility with the installed expo version:
[email protected] - expected version: 13.13.5
Your project may not work correctly until you install the expected versions of the packages.
Found outdated dependencies
Advice:
Use 'npx expo install --check' to review and upgrade your dependencies.
4 checks failed, indicating possible issues with the project.