Command `pod install` failed when running - npx expo run:ios

Hi all

I’m getting the following error when it try to run npx expo run:ios

For reference I’m on an M1 mac running expo sdk 49

:warning: Something went wrong running pod install in the ios directory.
Command pod install failed.
└─ Cause: Invalid Podfile file: 859: unexpected token at ‘’.

from /Users/matthewfreeman/2divegomobile/ios/Podfile:45


# @generated end react-native-maps

config = use_native_modules!


Can anyone provide me with guidance on how to fix this?

Thanks very much

@freem11 did you find a fix for this? I have same issue with the same mac computer

Hi @svarto
Sadly no I haven’t been able to fix it, so far my research leans towards it being an issue with a dependency that isn’t compatible.
Not really sure why a dependency would be a problem on an M1 chip but not on the intel ones though

What dependencies do you have installed?

Hi @wodin
probably more than most would recommend but my app is getting rather complex :slight_smile:

Here is the entire list though:

"@expo-google-fonts/caveat": "^0.2.3",
    "@expo-google-fonts/itim": "^0.2.3",
    "@expo-google-fonts/patrick-hand": "^0.2.3",
    "@expo-google-fonts/permanent-marker": "^0.2.3",
    "@expo-google-fonts/roboto": "^0.2.3",
    "@expo/config-plugins": "~7.2.2",
    "@expo/prebuild-config": "~6.2.4",
    "@expo/vector-icons": "^13.0.0",
    "@react-native-async-storage/async-storage": "1.18.2",
    "@react-native-community/datetimepicker": "7.2.0",
    "@react-native-google-signin/google-signin": "^10.0.1",
    "@supabase/supabase-js": "^1.35.7",
    "expo": "^49.0.0",
    "expo-apple-authentication": "~6.1.0",
    "expo-application": "~5.3.0",
    "expo-file-system": "~15.4.4",
    "expo-font": "~11.4.0",
    "expo-image-picker": "~14.3.2",
    "expo-linear-gradient": "~12.3.0",
    "expo-location": "~16.1.0",
    "expo-screen-orientation": "~6.0.5",
    "expo-splash-screen": "~0.20.5",
    "expo-status-bar": "~1.6.0",
    "expo-task-manager": "~11.3.0",
    "expo-updates": "~0.18.16",
    "moment": "^2.29.4",
    "react": "18.2.0",
    "react-native": "0.72.5",
    "react-native-autocomplete-dropdown": "^2.0.7",
    "react-native-dotenv": "^3.4.9",
    "react-native-email": "^2.1.0",
    "react-native-fbsdk-next": "^11.2.1",
    "react-native-gesture-handler": "~2.12.0",
    "react-native-inset-shadow": "^1.0.3",
    "react-native-maps": "1.7.1",
    "react-native-modal-datetime-picker": "^15.0.1",
    "react-native-pager-view": "6.2.0",
    "react-native-places-input": "^1.1.7",
    "react-native-reanimated": "~3.3.0",
    "react-native-size-matters": "^0.4.0",
    "react-native-svg": "13.9.0",
    "react-native-tab-view": "^3.5.2",
    "react-native-url-polyfill": "^1.3.0",
    "use-supercluster": "^0.4.0"

Again what confuses me is that on my older intel mac it builds without any issue its just the M1 that gets derailed.

Thanks for any help you can provide

I was able to build a test app with those dependencies (plus expo-dev-client) on my M1 Mac. I created a development Simulator build:

Build successful
You can find the build artifacts in /tmp/deps/build-1697839641331.tar.gz

I used eas build -p ios --profile sim-dev --local where sim-dev is defined like this:

  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    "sim-dev": {
      "extends": "development",
      "ios": {
        "simulator": true

But you should probably uninstall these.

The command worked and installed on my simulator
However I have two questions:

1)does the command
eas build -p ios --profile sim-dev --local
count towards the total builds per month limit?

  1. is there a reason why the old command
    npx expo run:ios
    is unable to build on the M1 macs?
  1. No. The monthly quota is for using Expo’s hardware. If you build on your own machine you can build as many times as you like for free.

  2. I don’t know. In theory if one works, so should the other.

It is strange just tired again on the M1 and while
eas build -p ios --profile sim-dev --local works
npx expo run:ios is still complaining about being unable to resolve expo-modules-core but only on M1 on my older intel mac it builds no problem

oh well at least I have a way to get an IOS preview on the M1 now

Do you have your android directory checked into git? Or is it in your .gitignore?

I put both /ios & /android into my .gitignore file

Sorry, of course I meant ios :slight_smile:

OK. And before running npx run:ios, have you tried deleting the ios directory or running npx expo prebuild --clean?

Since they are in .gitignore, they will not be copied into the temp directory when running eas build --local, so will be regenerated during the build.

When running npx expo run:ios, it will not regenerate the native projects if they already exist.

I hadnt but just tired that but still it game me

import ExpoModulesCore
| ^ could not find module ‘ExpoModulesCore’ for target ‘x86_64-apple-ios-simulator’; found: arm64-apple-ios-simulator, at: /Users/matthewfreeman/Library/Developer/Xcode/DerivedData/divegomobile-grfuxdqjhhrsyhhaxeuvobmlrelx/Build/Products/Debug-iphonesimulator/ExpoModulesCore/ExpoModulesCore.swiftmodule

As the error

I don’t know why there’s a difference when running npx expo run:ios, but maybe you can work around it.

The following article mentions a “Build Active Architecture Only” build setting:

So I think you should be able to prebuild, then open the project in Xcode and make sure that setting is set to yes before trying to build. I have not tried it.

You might find more hints in the Apple docs linked from the above article:

Or from one of the other search results when googling the error message.