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:
- Updated
@expo/image-utils to latest
- Removed the
web section from app.json
- Removed
expo-web-browser from the plugins array in app.json
- Added
EXPO_IMAGE_UTILS_NO_SHARP: "1" to the env in eas.json
- Added
overrides in package.json to force a single version of @expo/image-utils
- Deleted
node_modules and package-lock.json and ran a clean npm install
- 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:
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
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:
The Error:
The full stack trace points to:
What I've already tried:
@expo/image-utilsto latestwebsection fromapp.jsonexpo-web-browserfrom the plugins array inapp.jsonEXPO_IMAGE_UTILS_NO_SHARP: "1"to the env ineas.jsonoverridesinpackage.jsonto force a single version of@expo/image-utilsnode_modulesandpackage-lock.jsonand ran a cleannpm install--clear-cacheNone of these fixed it. The error is always identical.
What expo doctor says:
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:
My understanding of the root cause:
It seems like
@expo/image-utilsis trying to create a cache directory at.expo/webon 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-installhooks — 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