expo prebuild got error UMCore` depended upon by EXLinearGradient

  1. SDK Version: 43
  2. Platforms(Android/iOS/web/all): iOS

When I try to upgrade to 43 sdk and do the steps in this link I got this issue and I tried to many times to do it manually by type pod install and got the same error

Hi @it-dafa

It looks like you have a managed project (no ios directory or ios in .gitignore) right?

What command did you run to get the output in your screenshot? expo run:ios?

Can you run expo-cli doctor and see if it complains about anything?

Also, what dependencies and devDependencies do you have in package.json and do you have any "plugins" in app.json?

I have a bare expo project without ios/ and android/ directories and i’m trying to upgrade my expo sdk version from 42 to 43 and this is what happened there is nothing in .gitignore file.

I ran expo doctor and :tada: Didn’t find any issues with the project!

{
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "eject": "expo eject",
    "test": "jest --watchAll"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/vector-icons": "^12.0.0",
    "@kichiyaki/react-native-barcode-generator": "^0.6.7",
    "@react-native-async-storage/async-storage": "~1.15.0",
    "@react-native-community/datetimepicker": "3.5.2",
    "@react-native-community/masked-view": "0.1.10",
    "@react-native-community/netinfo": "6.0.2",
    "@react-navigation/bottom-tabs": "5.11.2",
    "@react-navigation/core": "^6.0.1",
    "@react-navigation/native": "^6.0.2",
    "@react-navigation/stack": "~5.12.8",
    "@types/react-native-actionsheet": "^2.4.2",
    "@types/react-native-countdown-component": "^2.7.0",
    "@types/react-native-snap-carousel": "^3.8.4",
    "@types/underscore": "^1.11.3",
    "axios": "^0.21.1",
    "expo": "^43.0.0",
    "expo-checkbox": "~2.0.0",
    "expo-clipboard": "~2.0.3",
    "expo-font": "~10.0.3",
    "expo-image-manipulator": "~10.1.2",
    "expo-image-picker": "~11.0.3",
    "expo-linking": "~2.4.2",
    "expo-notifications": "~0.13.3",
    "expo-splash-screen": "~0.13.5",
    "expo-status-bar": "~1.1.0",
    "expo-updates": "~0.10.15",
    "formik": "^2.2.6",
    "i18n-js": "^3.8.0",
    "leo-profanity": "^1.3.0",
    "moment": "^2.29.1",
    "npm": "^7.22.0",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-actionsheet": "^2.4.2",
    "react-native-animatable": "^1.3.3",
    "react-native-animate-number": "^0.1.2",
    "react-native-autolink": "^4.0.0",
    "react-native-calendar-picker": "^7.1.2",
    "react-native-chart-kit": "^6.11.0",
    "react-native-countdown-component": "^2.7.1",
    "react-native-flash-message": "^0.1.23",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-gradient-buttons": "^2.0.2",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-keyboard-aware-scroll-view": "^0.9.4",
    "react-native-lightbox-v2": "^0.9.0",
    "react-native-modal": "^13.0.1",
    "react-native-paper": "^4.8.1",
    "react-native-qrcode-svg": "^6.1.1",
    "react-native-render-html": "^6.1.0",
    "react-native-responsive-screen": "^1.4.2",
    "react-native-safe-area-context": "3.3.2",
    "react-native-screens": "~3.8.0",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-svg": "12.1.1",
    "react-native-text-ticker": "^1.14.0",
    "react-native-user-avatar": "^1.0.7",
    "react-navigation": "^4.4.4",
    "react-redux": "^7.2.4",
    "redux": "^4.1.0",
    "redux-devtools-extension": "^2.13.9",
    "redux-persist": "^6.0.0",
    "redux-promise": "^0.6.0",
    "redux-thunk": "^2.3.0",
    "underscore": "^1.13.1",
    "yup": "^0.32.9",
    "react-native-reanimated": "~2.2.0",
    "react-native-web": "0.17.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@types/bad-words": "^3.0.1",
    "@types/i18n-js": "^3.8.2",
    "@types/react": "~17.0.21",
    "@types/react-native": "~0.64.12",
    "@types/redux-promise": "^0.5.29",
    "jest-expo": "~43.0.1",
    "typescript": "~4.3.5",
    "react-test-renderer": "17.0.1"
  },
  "private": true,
  "name": "Loyal-prebuild",
  "version": "1.0.0"
}

this is package.json file

And there is no plugins in app.json file

If you do not have “ios” and “android” directories then it’s a managed project. Not bare. But anyway, you have confirmed what I suspected. Thanks :slight_smile:

It’s not usual to have npm as a dependency of your app. I think you should uninstall it.

You seem to have a mixture of React Navigation 4, 5 and 6.

You might want to remove this and install @react-native-masked-view/masked-view instead.

I tried building with your dependencies and got an error:

[!] Unable to find a specification for `UMCore` depended upon by `EXLinearGradient`

I tried making the above changes and then got a different (but similar) build error:

[!] Unable to find a specification for `UMCore` depended upon by `EXHaptics`

Both of these are dependencies of react-native-gradient-buttons, which seems to have been abandoned. It depends on version 9.x of expo-haptics and expo-linear-gradient, but in an Expo SDK 43 app you should be using version 11.x of those dependencies.

Fortunately, react-native-gradient-functions is basically just a single JavaScript file, so I would just copy it into your app along with the LICENSE, run expo install expo-haptics expo-linear-gradient, and remove the react-native-gradient-functions dependency.

Alternatively, you can fork the project, fix the dependencies, and then install the dependency from GitHub.

e.g.:

npm install git+https://github.com/it-data/react-native-gradient-buttons.git#branchname

or

yarn add git+https://github.com/it-data/react-native-gradient-buttons.git#branchname

After you have it building, you might want to look at updating some of your other dependencies.

It builds for me with these dependencies:

  "dependencies": {
    "@expo/vector-icons": "^12.0.0",
    "@kichiyaki/react-native-barcode-generator": "^0.6.7",
    "@react-native-async-storage/async-storage": "~1.15.0",
    "@react-native-community/datetimepicker": "3.5.2",
    "@react-native-community/netinfo": "6.0.2",
    "@react-native-masked-view/masked-view": "0.2.5",
    "@react-navigation/bottom-tabs": "^6.4.0",
    "@react-navigation/core": "^6.4.0",
    "@react-navigation/native": "^6.0.13",
    "@react-navigation/stack": "^6.3.4",
    "axios": "^1.1.3",
    "expo": "^43.0.0",
    "expo-checkbox": "~2.0.0",
    "expo-clipboard": "~2.0.3",
    "expo-font": "~10.0.3",
    "expo-haptics": "~11.0.3",
    "expo-image-manipulator": "~10.1.2",
    "expo-image-picker": "~11.0.3",
    "expo-linear-gradient": "~10.0.3",
    "expo-linking": "~2.4.2",
    "expo-notifications": "~0.13.3",
    "expo-splash-screen": "~0.13.5",
    "expo-status-bar": "~1.1.0",
    "expo-updates": "~0.10.15",
    "formik": "^2.2.9",
    "i18n-js": "^4.1.1",
    "leo-profanity": "^1.7.0",
    "moment": "^2.29.4",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-actionsheet": "^2.4.2",
    "react-native-animatable": "^1.3.3",
    "react-native-animate-number": "^0.1.2",
    "react-native-autolink": "^4.0.0",
    "react-native-calendar-picker": "^7.1.2",
    "react-native-chart-kit": "^6.12.0",
    "react-native-countdown-component": "^2.7.1",
    "react-native-flash-message": "^0.3.1",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-lightbox-v2": "^0.9.0",
    "react-native-modal": "^13.0.1",
    "react-native-paper": "^4.12.5",
    "react-native-qrcode-svg": "^6.1.2",
    "react-native-reanimated": "~2.2.0",
    "react-native-render-html": "^6.3.4",
    "react-native-responsive-screen": "^1.4.2",
    "react-native-safe-area-context": "3.3.2",
    "react-native-screens": "~3.8.0",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-svg": "12.1.1",
    "react-native-text-ticker": "^1.14.0",
    "react-native-user-avatar": "^1.0.8",
    "react-native-web": "0.17.1",
    "react-redux": "^8.0.5",
    "redux": "^4.2.0",
    "redux-devtools-extension": "^2.13.9",
    "redux-persist": "^6.0.0",
    "redux-promise": "^0.6.0",
    "redux-thunk": "^2.4.2",
    "underscore": "^1.13.6",
    "yup": "^0.32.11"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@types/bad-words": "^3.0.1",
    "@types/i18n-js": "^3.8.2",
    "@types/react": "~17.0.21",
    "@types/react-native": "~0.64.12",
    "@types/react-native-actionsheet": "^2.4.2",
    "@types/react-native-countdown-component": "^2.7.0",
    "@types/react-native-snap-carousel": "^3.8.4",
    "@types/redux-promise": "^0.5.29",
    "@types/underscore": "^1.11.3",
    "jest-expo": "~43.0.1",
    "react-test-renderer": "17.0.1",
    "typescript": "~4.3.5"
  },
1 Like

Oh sorry I meant managed project I had a misunderstanding :slight_smile:

Thank you for your helpful reply I will try to edit my app and tell you with updates.

1 Like

It Worked with me thank you so much for your help.

But now I’m confused, I can run the application in 2 ways:

  1. expo start
    If I used this way everything working fine but I don’t know if I can use expo publish and eas features. Is it possible ?

  2. expo run:[ios/android]
    If I used this way I have to work with the code same as react native cli and not everything from expo libraries working with me like i18n-js

What is the best way to work with and with maintaining the features of expo like: publish ?

And thanks again for your help.

1 Like

Great! :slight_smile:

expo start

This starts a development server on your machine that you can connect to with either Expo Go or a development build (also sometimes called a development client).

If you are only using dependencies from the Expo SDK or other plain JavaScript dependencies then you can use Expo Go for development. If you need something that has its own native code then you will need to create a development build (eas build --profile development ...) and use that instead of Expo Go.

I might have missed something, but I think that your dependencies can all work in Expo Go.

expo-cli publish or the new eas update don’t make sense when you’re running in development mode.

Preview builds

You can also build a “preview” version of your app with eas build --profile preview ...

This builds a version of the app that you can install on a physical device or the Android emulator. (You can also build a version that works on the iOS Simulator, but you need to change eas.json for that.)

A preview version of the app will work fine with expo-cli publish or eas update etc.

Production builds

You build these with eas build --profile production ...

You cannot submit a “preview” build to the App Store. You could technically submit the preview APK to the Play Store, but it’s better to build a production AAB and submit that.

expo run:*

This will call npx expo prebuild -p ios (or android), which generates the native ios / android projects and then builds them locally with Xcode / Android Studio and opens them in the emulator/Simulator. I don’t really like this because it clutters up your project with the native projects.
You don’t really need to use npx expo run:* except if you are developing native code as part of your app, or maybe trying to debug a build error or something like that.

So I would develop with Expo Go on the Android emulator and iOS Simulator or physical devices. (Unless you need something that doesn’t work with Expo Go, in which case I’d create a development build to install on the emulator/simulator/devices).

If I wanted to give the app to some testers I’d build a preview version of the app for them to install on their physical devices.

And for submitting to the App/Play stores, I’d build a production version.

I would avoid npx expo run unless I wanted to debug a build issue etc.

I think you gave me the definitive answer for my questions.

Thank you so much you really helped me.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.