Skip to content

EAS CLI Build Failure on Windows: EPERM Permission Error #3374

@issikaaymeric

Description

@issikaaymeric

Build/Submit details page URL

EAS CLI Build Failure on Windows: EPERM Permission Error

Summary

What's broken:
EAS CLI fails during the "Compressing project files and uploading to EAS Build" phase with an EPERM (operation not permitted) error when trying to remove temporary directories on Windows. The build process consistently fails at the cleanup stage after creating a shallow git clone.

Error: EPERM: operation not permitted, rmdir 'C:\temp\eas-cli-nodejs[uuid]-shallow-clone\dist'
Steps to take to fix it:

  1. Navigate to project directory in PowerShell
  2. Run: eas build --platform android
  3. Build configuration completes successfully (version increments, credentials verified)
  4. Compression starts
  5. Error occurs during cleanup of C:\temp\eas-cli-nodejs directory
  6. Build fails with EPERM error

This happens consistently regardless of:

  • Manually deleting C:\temp\eas-cli-nodejs beforehand
  • Setting custom environment variables (TMPDIR, TEMP, TMP)
  • Cleaning and reinstalling node_modules
  • Initializing git repository

Managed or bare?

Managed workflow

Environment

EAS CLI version:
[Check by running: eas --version]
Latest version (as of the issue date)
Platform(s):
Android (though likely affects all platforms on Windows)
Expo SDK version:
54.0.0
EAS Build details page URL:
N/A - Upload fails before build is created

Error output

Using EAS CLI without version control system is not recommended, use this mode only if you know what you are doing.
Resolved "production" environment for the build.
No environment variables with visibility "Plain text" and "Sensitive" found for the "production" environment on EAS.
Environment variables loaded from the "production" build profile "env" configuration: NODE_OPTIONS.

✔ Incremented versionCode from 21 to 22.
✔ Using remote Android credentials (Expo server)
✔ Using Keystore from configuration: Build Credentials fIEDFtqo2H (default)

Compressing project files and uploading to EAS Build. Learn more: https://expo.fyi/eas-build-archive
Failed to upload the project tarball to EAS Build

Reason: EPERM: operation not permitted, rmdir 'C:\temp\eas-cli-nodejs\3fca073f-78dd-4f5b-9610-d7cab2ee36e9-shallow-clone\dist'
Error: build command failed.

  • Compressing project files

Reproducible demo or steps to reproduce from a blank project

  1. Set up Expo React Native project on Windows with Expo SDK 54
  2. Configure EAS Build (eas build:configure)
  3. Attempt to build: eas build --platform android
  4. Observe EPERM error during compression/upload phase

The issue appears to be Windows-specific file permission handling when EAS CLI attempts to clean up temporary shallow git clones in C:\temp\eas-cli-nodejs.

Attempted workarounds without success:

  • Setting custom temp directory environment variables
  • Running with administrator privileges
  • Manually cleaning temp directories
  • Fresh node_modules installation
  • Git repository initialization

This seems to be a known Windows permission issue where Node.js cannot remove directories that are still being accessed by the system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reviewIssue is ready to be reviewed by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions