Trying to build expo react native app with eas gives error at pod install step

Hi,

I have a managed workflow app with Expo 47 SDK, EAS 3.7.2, React Native 0.70.5.
When I try to build with EAS it falis at pod install step.

I have done exhaustive research on this and found some results which are similar but dont fix the issue.
This is the error.

1 Using Expo modules
2 [Expo] Enabling modular headers for pod ExpoModulesCore
3 Auto-generating `.xcode.env.local` with $NODE_BINARY=/Users/expo/.nvm/versions/node/v16.18.1/bin/node
4 Auto-linking React Native modules for target `WWIIAircraftV2`: RNCAsyncStorage, lottie-react-native, and react-native-netinfo
5 [Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
6 Analyzing dependencies
7 Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
8 [Codegen] Found FBReactNativeSpec
9 Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
10 Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
11 Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
12 Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
13 CocoaPods 1.12.0 is available.
14 To update use: `gem install cocoapods`
15 For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.12.0
16 [!] Unable to find a specification for `EXUpdatesInterface` depended upon by `EXUpdates`
17 You have either:
18 out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
19 mistyped the name or version.
20  * not added the source repo that hosts the Podspec to your Podfile.
21 pod exited with non-zero code: 1

I didnt have a ios or andriod folder before I got this error.
I have tried doing a ‘expo prebuild’ from a suggestion and also tried the suggestion in the error.
I now have the ios and android folders.

I dont understand how with a managed workflow app I should need to do anything about Pods!

Any help would be appreciated?

Hi @malcolmds

You’re right. You shouldn’t have to worry about pods for a managed worflow app.

Please post a link to one of your failed builds in case one of the Expo team members has time to investigate. Only Expo team members will be able to check your build logs (so I won’t be able to), but better to post the link here in case one of them finds your post. Otherwise they might have to request it which will just slow down the process.

Do you have an ios directory in your app? For a managed workflow app you should not (or else it should be in your .gitignore file).

Please post the output of npx expo-doctor

Please also post your dependencies and devDependencies from package.json and your plugins section from app.json if you are using any config plugins.

Thanks @wodin

Build Details — 923a1725-8805-4aae-b43d-050e934490f6 — WWIIAircraft_V2 — Expo](Build Details — 923a1725-8805-4aae-b43d-050e934490f6 — WWIIAircraft_V2 — Expo)

Yes I do have an IOS directory but that is only after I ran ‘expo prebuild’ because of a google post I read.
I have /ios/Pods/ in my .gitignore

npx expo-doctor output

✔ Validating global prerequisites versions
✔ Checking for incompatible packages
✔ Checking for conflicting global packages in project
✖ Verifying prebuild support package versions are compatible
Issues:
  Expected package @expo/config-plugins@^5.0.2
  Found invalid:
    @expo/config-plugins@3.1.0
    (for more info, run: npm why @expo/config-plugins)
Advice:
  • Upgrade dependencies that are using the invalid package versions.
✔ Checking dependency versions for compatibility with the installed Expo SDK
✔ Validating Expo Config
✖ Checking package.json for common issues
Issues:
  The package "expo-modules-autolinking" should not be installed directly in your project. It is a dependency of other Expo packages and should be installed automatically.

✖ Found one or more possible issues with the project. See above logs for issues and advice to resolve.

package.json

"dependencies": {
    "@bugsnag/expo": "^47.0.0",
    "@bugsnag/plugin-expo-eas-sourcemaps": "^47.1.0",
    "@bugsnag/source-maps": "^2.3.1",
    "@expo/vector-icons": "^13.0.0",
    "@react-native-async-storage/async-storage": "^1.17.11",
    "@react-native-community/netinfo": "9.3.5",
    "@react-navigation/bottom-tabs": "^6.5.5",
    "@react-navigation/native": "^6.1.4",
    "@react-navigation/stack": "^6.3.14",
    "axios": "^1.3.3",
    "b64-to-file": "^1.0.4",
    "deprecated-react-native-prop-types": "^4.0.0",
    "expo": "~47.0.12",
    "expo-application": "~5.0.1",
    "expo-constants": "~14.0.2",
    "expo-crypto": "~12.0.0",
    "expo-device": "~5.0.0",
    "expo-file-system": "~15.1.1",
    "expo-splash-screen": "~0.17.5",
    "expo-status-bar": "~1.4.2",
    "expo-updates": "~0.15.6",
    "formik": "^2.2.9",
    "install-expo-modules": "^0.5.1",
    "lodash": "^4.17.21",
    "lottie-react-native": "5.1.4",
    "qs": "^6.11.0",
    "react": "18.1.0",
    "react-native": "0.70.5",
    "react-native-device-detection": "^0.2.1",
    "react-native-elements": "^3.4.3",
    "react-native-htmlview": "^0.16.0",
    "yup": "^1.0.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },

app.json

"plugins": [
      "@bugsnag/plugin-expo-eas-sourcemaps"
    ]

Don’t believe everything you read on Google :wink:

expo prebuild generates the native projects, effectively switching you to the Bare workflow. In order to switch back you basically need to remove the ios and android directories again, or add them to .gitignore.

It should be the whole ios and android directories. Not just /ios/Pods/

This is pretty old. It might be because of bugsnag. Try:

npm why "@expo/config-plugins@3.1.0"

Remove this.

Nothing else jumps out at me as being problematic, but I would have to have a closer look to be sure.

1 Like

@wodin

npm why @expo/config-plugins@3.1.0 gives this?

@expo/config-plugins@3.1.0
node_modules/expo-updates/node_modules/@expo/config-plugins
@expo/config-plugins@“3.1.0” from @expo/config@5.0.9
node_modules/expo-updates/node_modules/@expo/config
@expo/config@“5.0.9” from @expo/metro-config@0.1.84
node_modules/expo-updates/node_modules/@expo/metro-config
@expo/metro-config@“^0.1.16” from expo-updates@0.4.2
node_modules/expo-updates
expo-updates@“^0.4.1” from fiction-expo-restart@1.1.3
node_modules/fiction-expo-restart
fiction-expo-restart@“^1.1.2” from the root project

Ah. fiction-expo-restart is causing the old version of @expo/config-plugins to be installed.

It depends on expo-updates@“^0.4.1”, which is old and depends on the old version of @expo/config-plugins.

The complete code of fiction-expo-restart is as follows:

import * as Updates from 'expo-updates';
import { Platform } from 'react-native';

const Restart = ()=>{
    if(Platform.OS=="web")
    {
        window.location.reload()
    }
    else{
        Updates.reloadAsync();
    }
}
export { Restart }

So I suggest you uninstall it. You do not have react-dom and react-native-web installed, so do not need to worry about Platform.OS === "web" and you can just replace calls to fiction-expo-restart’s Restart function with Updates.reloadAsync().

Adding the Android folder inside .gitignore helped me with the Gradle issue occurring after “expo eject” for Android. The expo doctor helped with resolving bundle issues as some dependencies were too new to be used.
Thanks for the help

1 Like

@wodin getting the same issue. Never done prebuild and I’m on managed workflow also. Here the package.json

{
  "name": "uv",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "start:tunnel": "expo start --tunnel",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "test": "jest --watchAll",
    "typesafe-i18n": "npx typesafe-i18n --no-watch",
    "expo:publish:dev": "npx eas update --branch 'dev'"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo-google-fonts/roboto": "^0.2.2",
    "@expo/react-native-action-sheet": "^4.0.1",
    "@expo/vector-icons": "^13.0.0",
    "@formatjs/intl-getcanonicallocales": "^2.0.5",
    "@formatjs/intl-locale": "^3.0.11",
    "@formatjs/intl-pluralrules": "^5.1.8",
    "@gorhom/bottom-sheet": "^4.4.5",
    "@hookform/resolvers": "^2.9.10",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/datetimepicker": "6.5.2",
    "@react-native-community/netinfo": "9.3.5",
    "@react-native-picker/picker": "2.4.8",
    "@react-navigation/bottom-tabs": "^6.5.3",
    "@react-navigation/elements": "^1.3.13",
    "@react-navigation/native": "^6.1.2",
    "@react-navigation/native-stack": "^6.1.0",
    "@react-navigation/stack": "^6.3.11",
    "@sentry/react-native": "4.9.0",
    "@tanstack/query-async-storage-persister": "^4.26.1",
    "@tanstack/react-query": "^4.18.0",
    "@tanstack/react-query-persist-client": "^4.26.1",
    "axios": "^1.2.0",
    "axios-auth-refresh": "^3.3.6",
    "date-fns": "^2.29.3",
    "dotenv": "^16.0.3",
    "expo": "~47.0.7",
    "expo-application": "~5.0.1",
    "expo-asset": "~8.7.0",
    "expo-auth-session": "~3.8.0",
    "expo-blur": "~12.0.1",
    "expo-constants": "~14.0.2",
    "expo-device": "~5.0.0",
    "expo-document-picker": "~11.0.1",
    "expo-file-system": "~15.1.1",
    "expo-font": "~11.0.1",
    "expo-haptics": "~12.0.1",
    "expo-image-picker": "~14.0.2",
    "expo-linking": "~3.3.1",
    "expo-localization": "~14.0.0",
    "expo-random": "~13.0.0",
    "expo-screen-orientation": "~5.0.1",
    "expo-secure-store": "~12.0.0",
    "expo-sharing": "~11.0.1",
    "expo-splash-screen": "~0.17.5",
    "expo-status-bar": "~1.4.2",
    "expo-system-ui": "~2.0.1",
    "expo-updates": "~0.15.6",
    "expo-web-browser": "~12.0.0",
    "jotai": "^1.11.2",
    "jotai-immer": "0.1.0",
    "lodash": "^4.17.21",
    "pretty-bytes": "^6.0.0",
    "react": "18.1.0",
    "react-dom": "18.1.0",
    "react-hook-form": "^7.40.0",
    "react-native": "0.70.8",
    "react-native-dropdown-picker": "^5.4.4",
    "react-native-gesture-handler": "~2.8.0",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-mask-input": "^1.2.3",
    "react-native-modal-datetime-picker": "^14.0.0",
    "react-native-reanimated": "~2.12.0",
    "react-native-safe-area-context": "4.4.1",
    "react-native-screens": "~3.18.0",
    "react-native-svg": "13.4.0",
    "react-native-toast-message": "^2.1.5",
    "react-native-web": "~0.18.9",
    "react-native-webview": "11.23.1",
    "react-navigation-shared-element": "^3.1.3",
    "sentry-expo": "~6.0.0",
    "typesafe-i18n": "^5.17.1",
    "zod": "^3.19.1",
    "zustand": "^4.1.4",
    "expo-local-authentication": "~13.0.2",
    "@types/react-native": "~0.70.6",
    "expo-clipboard": "~4.0.1",
    "expo-brightness": "~11.0.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
    "@types/jest": "^29.2.5",
    "@types/lodash": "^4.14.191",
    "@types/react": "~18.0.24",
    "babel-plugin-inline-dotenv": "^1.7.0",
    "eslint": "^8.28.0",
    "eslint-config-universe": "^11.1.1",
    "jest": "^26.6.3",
    "jest-expo": "~47.0.1",
    "prettier": "^2.8.0",
    "react-native-svg-transformer": "^1.0.0",
    "react-test-renderer": "18.1.0",
    "typescript": "^4.6.3"
  },
  "private": true
}

The error

Using Expo modules
[Expo] Enabling modular headers for pod ExpoModulesCore
Auto-generating `.xcode.env.local` with $NODE_BINARY=/Users/expo/.nvm/versions/node/v16.18.1/bin/node
Auto-linking React Native modules for target `padmobile`: RNCAsyncStorage, RNCPicker, RNDateTimePicker, RNGestureHandler, RNReanimated, RNSVG, RNScreens, RNSentry, react-native-netinfo, react-native-safe-area-context, and react-native-webview
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
fatal: not a git repository (or any of the parent directories): .git
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes/hermes-engine.podspec`
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
CocoaPods 1.12.1 is available.
To update use: `gem install cocoapods`
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.12.1
[!] Unable to find a specification for `EXUpdatesInterface` depended upon by `EXUpdates`
You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.
pod exited with non-zero code: 1
```

Hi @equimperuv

I installed your dependencies in a test app and was able to build with no problem:

You’re sure you don’t have an ios directory in your project?

I found the issue my version of expo-updates was wrong. I update it and now no issue. But this was the version install with expo install.

This is the version that was installed when I installed your dependencies and it did not cause me any build problems:

expo-updates@~0.15.6:
  version "0.15.6"
  resolved "https://registry.yarnpkg.com/expo-updates/-/expo-updates-0.15.6.tgz#99e3faa3e38312ebddb77afb697863fa1f1f6a03"
  integrity sha512-g5BuCmWdyiLqFaVkVz+m7r6U7MHJrLKvqybs04H6ArMNpTEf6FhUwSzmnCyOkSSP35KFNkC/I0dYlgW3Vcf1sw==
  dependencies:
    "@expo/code-signing-certificates" "0.0.5"
    "@expo/config" "~7.0.2"
    "@expo/config-plugins" "~5.0.3"
    "@expo/metro-config" "~0.5.0"
    arg "4.1.0"
    expo-eas-client "~0.4.0"
    expo-manifests "~0.4.0"
    expo-structured-headers "~3.0.0"
    expo-updates-interface "~0.8.0"
    fbemitter "^3.0.0"
    resolve-from "^5.0.0"
    uuid "^3.4.0"

But I’m glad you’ve got it working.