Fix React-Core-prebuilt Missing Required Attribute Source in React Native iOS
Fix the “React-Core-prebuilt missing required attribute source” CocoaPods error in React Native iOS builds. Covers bad component path errors, cache cleanup, node_modules reinstall, and project path issues.
On this page
After creating a fresh React Native app and running `pod install`, you may suddenly see `bad component(expected absolute path component)` followed by `React-Core-prebuilt pod failed to validate`. This error is confusing because CocoaPods appears installed correctly and React Native setup seems complete. The issue is usually not CocoaPods itself — it is caused by corrupted React Native prebuilt artifacts, cache problems, invalid paths, or dependency inconsistencies.
The Error
What Causes This Error
Newer React Native versions use prebuilt artifacts for React Native Core and Dependencies during iOS pod installation. During `pod install`, CocoaPods downloads and validates these packages automatically. If the downloads are corrupted, cached files are stale, paths are malformed, or dependencies become inconsistent, validation can fail with the `React-Core-prebuilt` missing required attribute `source` error.
- Spaces in project parent folder names
- Corrupted CocoaPods cache
- Corrupted React Native artifact downloads
- Broken node_modules installation
- Interrupted package installation
- React Native prebuilt artifact bugs
Fix 1: Clean iOS Pod Files
Fix 2: Clear CocoaPods Cache
Fix 3: Reinstall node_modules
Fix 4: Check Project Path
Some users hit this error because their parent project directory contains spaces such as `Production Code` or `My Projects`. Certain internal scripts still struggle with path parsing.
Fix 5: Install Pods Again
Quick Diagnosis Checklist
- Delete Pods and Podfile.lock
- Clear CocoaPods cache
- Delete node_modules and reinstall
- Check project path for spaces
- Run pod install again
- Run npx react-native run-ios
FAQ
Is this only caused by spaces in folder names?
No. Spaces are only one possible trigger. Cache corruption, failed downloads, and dependency issues are also common causes.
Does reinstalling CocoaPods fix it?
Usually no. CocoaPods itself often works correctly. Cleaning cache and artifacts is more effective.
Does Android have this problem?
Mostly no. This issue usually affects iOS pod installation and React Native prebuilt artifacts.
Shahmeer Rizwan
Full-Stack Developer