Skip to content

EAS Build failing at Prebuild phase — EACCES permission denied on .expo/web #3570

@tantanf15-jpg

Description

@tantanf15-jpg

Summary

Hi everyone,

I've been stuck on this issue for several hours and can't figure out what's causing it. I'm building a React Native app with Expo SDK 54 and every time I run an EAS Build for iOS, it fails at the Prebuild phase with the same error.


My Setup:

  • Expo SDK: 54.0.33
  • React Native: 0.81.5
  • EAS CLI: latest
  • Platform: iOS (internal distribution / preview profile)
  • Building from: Windows 11 (PowerShell)

The Error:

Error: [ios.dangerous]: withIosDangerousBaseMod: EACCES: permission denied, mkdir '/Users/expo/workingdir/build/.expo/web'

npx expo prebuild --no-install --platform ios exited with non-zero code: 1

The full stack trace points to:

at async ensureCacheDirectory (@expo/image-utils/build/Cache.js:40:5)
at async generateImageAsync (@expo/image-utils/build/Image.js:227:22)
at async generateUniversalIconAsync (...withIosIcons.js:187:15)

What I've already tried:

  1. Updated @expo/image-utils to latest
  2. Removed the web section from app.json
  3. Removed expo-web-browser from the plugins array in app.json
  4. Added EXPO_IMAGE_UTILS_NO_SHARP: "1" to the env in eas.json
  5. Added overrides in package.json to force a single version of @expo/image-utils
  6. Deleted node_modules and package-lock.json and ran a clean npm install
  7. Ran every build with --clear-cache

None of these fixed it. The error is always identical.


What expo doctor says:

Found duplicates for expo-constants:
- [email protected] (node_modules/expo/node_modules/expo-constants)
- [email protected] (node_modules/expo-auth-session/node_modules/expo-constants)
- [email protected] (node_modules/expo-linking/node_modules/expo-constants)

Though it's the same version across all three, so I'm not sure this is causing the issue.


My current eas.json:

{
  "cli": { "version": ">= 18.4.0", "appVersionSource": "remote" },
  "build": {
    "preview": {
      "distribution": "internal",
      "env": {
        "EXPO_IMAGE_UTILS_NO_SHARP": "1"
      }
    }
  }
}

My current app.json plugins:

"plugins": ["expo-font"]

My understanding of the root cause:
It seems like @expo/image-utils is trying to create a cache directory at .expo/web on the EAS build server, but the process doesn't have write permissions to that path. This happens regardless of what I change locally, which makes me think it's something in how EAS sets up the build environment for SDK 54.


My question:
Has anyone encountered this exact error with Expo SDK 54 on EAS Build? Is there a known fix or workaround? I've seen suggestions about eas-build-post-install hooks — would that help here, and if so, what exactly should it contain?

Any help would be greatly appreciated!

Link to the related documentation page

Isn’t

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions