Expo "expo prebuild" failed (native generation) in CI
expo prebuild generates the native android/ and ios/ projects from app.json/app.config.js and applies config plugins. It fails when a plugin throws, a required field is missing, or an existing native directory conflicts with regeneration.
What this error means
A npx expo prebuild step fails with a plugin stack trace, "Cannot resolve config plugin", or an error that the native directory already exists and is dirty.
Error: [ios.infoPlist]: withIosInfoPlistBaseMod: Cannot read properties of undefined (reading 'CFBundleURLTypes')
PluginError: Failed to resolve plugin for module "expo-camera"Common causes
A config plugin threw during prebuild
A plugin in the plugins array errors because of a missing option or an incompatible plugin version.
A conflicting existing native directory
Committed or leftover android//ios/ directories conflict with regeneration unless prebuild is told to clean.
How to fix it
Run prebuild clean and read the plugin error
Regenerate native projects from scratch and find the failing plugin.
npx expo prebuild --clean --platform androidFix or pin the failing config plugin
- Identify the plugin named in the error.
- Provide its required options in app config, or pin a compatible version.
- Re-run prebuild.
{ "expo": { "plugins": [["expo-camera", { "cameraPermission": "Allow camera" }]] } }How to prevent it
- Use prebuild --clean in CI for deterministic native output.
- Pin config plugin versions to ones matched to your Expo SDK.
- Avoid committing generated native directories in a managed workflow.