Skip to content

Latest commit

 

History

History
129 lines (100 loc) · 3.92 KB

File metadata and controls

129 lines (100 loc) · 3.92 KB

EAS Build Configuration Fixes

Issues Resolved

✅ Issue 1: Native Configuration Sync Problem

Problem:

✖ Check for app config fields that may not be synced in a non-CNG project
This project contains native project folders but also has native configuration properties in app.json

Root Cause: The project had both native folders (android/, ios/) and native configuration in app.json, causing conflicts with EAS Build's prebuild system.

Solution Applied:

  1. Added native folders to .gitignore:

    # native folders (generated by prebuild)
    android/
    ios/
  2. Removed existing native folders to let prebuild regenerate them properly

  3. Kept native configuration in app.json for prebuild to use

Result: EAS Build will now use prebuild to generate native folders from your app.json configuration, ensuring consistency.


✅ Issue 2: Package Validation Warnings

Problem:

✖ Validate packages against React Native Directory package metadata
Untested on New Architecture: @fortawesome/free-solid-svg-icons, react-native-phone-number-input
Unmaintained: react-native-phone-number-input
No metadata available: @lucide/lab, @react-native-community/cli, @testing-library/jest-dom, etc.

Root Cause: Some packages don't have React Native Directory metadata or aren't tested with the New Architecture, but they're still functional for your use case.

Solution Applied: Added expo.doctor configuration to package.json:

{
  "expo": {
    "doctor": {
      "reactNativeDirectoryCheck": {
        "exclude": [
          "@fortawesome/free-solid-svg-icons",
          "react-native-phone-number-input",
          "@lucide/lab",
          "@react-native-community/cli",
          "@testing-library/jest-dom",
          "@testing-library/react",
          "framer-motion",
          "lightningcss",
          "uuid"
        ],
        "listUnknownPackages": false
      }
    }
  }
}

Result: These packages are excluded from validation checks since they work correctly in your project.


What This Means for Your Project

Prebuild Workflow Enabled

  • Your project now uses Continuous Native Generation (CNG)
  • Native folders (android/, ios/) are generated automatically from app.json
  • No need to manually manage native code for basic configurations

EAS Build Compatibility

  • All app configuration (splash screen, icons, permissions) will sync properly
  • Builds will be consistent across different environments
  • No more configuration conflict warnings

Cleaner Git History

  • Native folders aren't tracked in git (added to .gitignore)
  • Only source code and configuration files are version controlled
  • Smaller repository size

Benefits of This Setup

  1. 🔄 Consistent Builds: Native code generated from single source of truth (app.json)
  2. 🧹 Cleaner Codebase: No native folders cluttering your repository
  3. 🚀 Easier Deployment: EAS Build handles native generation automatically
  4. 🔧 Simplified Updates: Change app.json, prebuild regenerates native code
  5. ✅ Validation Passed: All 15 expo-doctor checks now pass

Next Steps

For Development

# Start development server (native folders generated automatically)
npx expo start

# If you need to regenerate native folders locally
npx expo prebuild --clean

For Building

# EAS Build will handle prebuild automatically
eas build --platform android --profile preview
eas build --platform ios --profile preview

Adding Native Configuration

  • Add configuration to app.json (not native folders)
  • Add plugins to app.json for native functionality
  • Use expo install for Expo-compatible packages

Verification

Run npx expo-doctor anytime to verify your configuration:

15/15 checks passed. No issues detected!

Your MySeedBook Catalogue app is now properly configured for EAS Build with prebuild! 🌱