Edit this page
Learn how to use EAS Build locally on your machine or a custom infrastructure using the --local flag.
You can run the same build process that is typically run on the EAS Build servers directly on your machine by using the eas build --local
flag. This is a useful way to debug build failures that are happening on your cloud builds, which you may not be able to reproduce without running the same set of steps.
-
eas build --platform android --local
# or
-
eas build --platform ios --local
You need to be authenticated with Expo:
eas login
EXPO_TOKEN
using token-based authentication@account/slug
existsIf you encounter build failures on EAS servers and you're unable to determine the cause from inspecting the logs, you may find it helpful to debug the issue locally. To simplify that process we support several environment variables to configure the local build process.
EAS_LOCAL_BUILD_SKIP_CLEANUP=1
- Set this to disable cleaning up the working directory after the build process is finished.EAS_LOCAL_BUILD_WORKINGDIR
- Specify the working directory for the build process, by default it's somewhere (it's platform dependent) in /tmp directory.EAS_LOCAL_BUILD_ARTIFACTS_DIR
- The directory where artifacts are copied after a successful build. By default, these files are copied to the current directory, which may be undesirable if you are running many consecutive builds.If you use EAS_LOCAL_BUILD_SKIP_CLEANUP
and EAS_LOCAL_BUILD_WORKINGDIR
for iOS builds you should be able to inspect the contents of the logs
subdirectory of the working directory to read your Xcode logs.
Some of the options available for cloud builds are not available locally. Limitations you should be aware of:
all
is disabled).node
, yarn
, fastlane
, cocoapods
, ndk
, image
in eas.json are ignored.To compile your app locally for development with Expo CLI, use npx expo run:android
or npx expo run:ios
commands instead. If you use Continuous Native Generation, you can also run prebuild to generate your android and ios directories and then proceed to open the projects in the respective IDEs and build them like any native project. For more details, see:
Learn how to compile and build your Expo app locally.
To create a production build locally, you need Android Studio and Xcode installed on your computer. See the following guide for more information:
Learn how to create a production build for your Expo app locally on your computer.
With any of the above approaches, you'll be following procedures which are different from creating a build on the cloud with EAS Build — that is what the eas build --local
flag is for.