expo / eas-cli

Fastest way to build, submit, and update iOS and Android apps
https://docs.expo.dev/eas/
MIT License
773 stars 81 forks source link

error: unknown command 'generate-modules-provider'. See ' --help'. EAS IOS Build Expo49 #2201

Closed kaushik1094 closed 5 months ago

kaushik1094 commented 7 months ago

Build/Submit details page URL

No response

Summary

EAS build for IOS is failing with the following error: error: unknown command 'generate-modules-provider'. See ' --help'.

Expo SDK version: ^49.0.21 React Native Version: "0.72.6"

Failing at fastlane

image

Managed or bare?

Managed

Environment

eas build --platform ios

Error output

image

› Executing FrontlineMTApp » [Expo] Configure project

❌ error: unknown command 'generate-modules-provider'. See ' --help'.

Reproducible demo or steps to reproduce from a blank project

Build with Expo 49 for IOS and failing at fastlane

Using NPM to manage dependencies.

Only happening while using npm works fine with yarn

kaushik1094 commented 7 months ago

Just an update, I got my build to work using yarn, but I had to switch from npm to yarn and making sure I didn't have any package-lock.json file while building but this is still happening if we are using npm

Build works fine if you are using yarn

evandrorocha commented 7 months ago

Same issue here. In my case, the build error "unknown command generate-modules-provider" started to happen in ios builds on january 25th. Even if use yarn to build dependencies , the error occurs. Before january 25th , I had successful builds on ios with the same dependencies (package.json) . What could it trigger the the build error "unknown command generate-modules-provider" in iOS build?

My project dependencies are:

"dependencies": { "@react-native-async-storage/async-storage": "1.18.2", "@react-native-community/datetimepicker": "7.2.0", "@react-native-community/netinfo": "9.3.10", "@react-native-picker/picker": "2.4.10", "@sentry/react-native": "5.10.0", "@types/d3-shape": "^1.3.2", "@types/react-native-snap-carousel": "^3.8.2", "@types/react-native-svg-charts": "^5.0.6", "axios": "^0.19.0", "d3-scale": "^1.0.6", "d3-shape": "^1.0.6", "expo": "^49.0.0", "expo-analytics": "^1.0.16", "expo-app-loading": "~2.0.0", "expo-application": "~5.3.0", "expo-asset": "~8.10.1", "expo-barcode-scanner": "~12.5.3", "expo-brightness": "~11.4.1", "expo-calendar": "~11.3.2", "expo-camera": "~13.4.4", "expo-clipboard": "~4.3.1", "expo-constants": "~14.4.2", "expo-dev-client": "~2.4.12", "expo-device": "~5.4.0", "expo-document-picker": "~11.5.4", "expo-file-system": "~15.4.5", "expo-font": "~11.4.0", "expo-image-picker": "~14.3.2", "expo-intent-launcher": "~10.7.0", "expo-linear-gradient": "~12.3.0", "expo-linking": "~5.0.2", "expo-local-authentication": "~13.4.1", "expo-location": "~16.1.0", "expo-media-library": "~15.4.1", "expo-permissions": "~14.2.1", "expo-sharing": "~11.5.0", "expo-splash-screen": "~0.20.5", "expo-store-review": "~6.4.0", "expo-updates": "~0.18.17", "expo-web-browser": "~12.3.2", "formik": "^2.1.4", "geolib": "^3.2.1", "libphonenumber-js": "^1.7.18", "linear-gradient": "^1.0.6", "lodash": "^4.17.20", "lottie-react-native": "5.1.6", "md5": "^2.2.1", "memoize-one": "^5.1.1", "moment": "^2.24.0", "react": "18.2.0", "react-dom": "18.2.0", "react-native": "0.72.6", "react-native-action-button": "^2.8.5", "react-native-calendars": "^1.141.0", "react-native-collapsible": "^1.5.3", "react-native-css-gradient": "^0.3.1", "react-native-easy-toast": "^1.2.0", "react-native-elements": "1.2.7", "react-native-extended-stylesheet": "^0.12.0", "react-native-flash-message": "^0.1.13", "react-native-floating-action": "^1.18.0", "react-native-gesture-handler": "~2.12.0", "react-native-image-view": "^2.1.11", "react-native-keyboard-aware-scroll-view": "^0.9.3", "react-native-maps": "1.7.1", "react-native-markdown-display": "^7.0.0-alpha.2", "react-native-masked-text": "^1.12.3", "react-native-material-ripple": "^0.8.0", "react-native-modal": "^11.5.3", "react-native-modal-datetime-picker": "^15.0.0", "react-native-picker-select": "^8.0.4", "react-native-progress": "3", "react-native-progress-wheel": "^1.0.4", "react-native-qrcode-svg": "^6.0.3", "react-native-reanimated": "~3.3.0", "react-native-render-html": "^4.2.4", "react-native-router-flux": "4.3.2", "react-native-safe-area-context": "4.6.3", "react-native-screens": "~3.22.0", "react-native-snap-carousel": "4.0.0-beta.4", "react-native-svg": "13.9.0", "react-native-svg-charts": "^5.3.0", "react-native-swipe-list-view": "^3.2.6", "react-native-swiper": "^1.6.0", "react-native-vector-icons": "^6.4.2", "react-native-webview": "13.2.2", "react-redux": "~7.2.2", "redux": "^4.0.1", "redux-devtools-extension": "^2.13.8", "redux-form": "^8.3.7", "redux-form-input-masks": "^2.0.1", "redux-thunk": "^2.3.0", "remove-accents": "^0.4.2", "sentry-expo": "~7.1.0", "ts-optchain": "^0.1.8", "yup": "^0.32.8" }, "devDependencies": { "@types/axios": "^0.14.0", "@types/enzyme": "^3.10.8", "@types/enzyme-adapter-react-16": "^1.0.5", "@types/expo": "^33.0.1", "@types/jest": "^26.0.16", "@types/react": "~18.2.14", "@types/react-native-calendars": "^1.20.6", "@types/react-native-collapsible": "^0.11.0", "@types/react-native-vector-icons": "^6.4.6", "@types/react-redux": "^7.1.11", "@types/react-test-renderer": "^16.9.1", "@types/redux-form": "^8.1.7", "babel-preset-expo": "^9.3.0", "enzyme": "^3.10.0", "enzyme-adapter-react-16": "^1.15.5", "eslint": "^8.55.0", "eslint-config-prettier": "^9.1.0", "eslint-config-universe": "^12.0.0", "eslint-plugin-prettier": "^5.1.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-unused-imports": "^3.0.0", "jest-expo": "~49.0.0", "prettier": "^3.1.1", "react-test-renderer": "16.8.6", "reactotron-react-native": "3.7.1", "reactotron-redux": "3.1.3", "ts-jest": "^26.4.4", "typescript": "^5.1.3" }

yokozawa0701 commented 7 months ago

I've solved it by updating expo to "50.0.4" .

kaushik1094 commented 7 months ago

@evandrorocha It's probably because build job is unable to find module "generate-modules-provider".

@yokozawa0701 I am not ready to upgrade to expo 50 yet.

evandrorocha commented 7 months ago

I've solved it downgrading the dev dependency "@types/expo": "^33.0.1" to "@types/expo": "^32.0.13". I dont know why, but it worked.

abranhe commented 7 months ago

My team has the same issue, any explanation about the cause?

kaushik1094 commented 7 months ago

@abranhe not yet, My app is stuck at splashscreen with successful build using yarn. So it might be happening with yarn too

kaushik1094 commented 7 months ago

Fixed it, make sure to run npx expo-doctor and make sure to install comptaible version of expo-modules-autolinking i.e ~1.5.0 is installed on your project. @abranhe please confirm it works for your team as well and I will close the issue.

bradherman commented 6 months ago

Just an update, I got my build to work using yarn, but I had to switch from npm to yarn and making sure I didn't have any package-lock.json file while building but this is still happening if we are using npm

Build works fine if you are using yarn

also using yarn but getting this error

abranhe commented 6 months ago

An update here.

The only solution that worked for us was upgrading to Expo 50.

kapobajza commented 5 months ago

Fixed it, make sure to run npx expo-doctor and make sure to install comptaible version of expo-modules-autolinking i.e ~1.5.0 is installed on your project. @abranhe please confirm it works for your team as well and I will close the issue.

This was the issue I also faced. expo-modules-autolinking was at version 1.10.3, which is incompatible with expo SDK 49. I didn't want to install the version ~1.5.0 manually because that could cause version incompatibilities and other unexpected issues. So in order to downgrade to ~1.5.0 I had to find the culprit which was forcing it to version 1.10.3. Running npm ls expo-modules-autolinking@1.10.3 (if using npm) really helped me out. It showed me that the culprit was eas-cli@^7.6.0, because it was evaluating to eas-cli@7.6.2. Downgrading the eas-cli version fixed the issue.

3madurya3 commented 5 months ago

eas-cli@^7.6.0

Fixed it, make sure to run npx expo-doctor and make sure to install comptaible version of expo-modules-autolinking i.e ~1.5.0 is installed on your project. @abranhe please confirm it works for your team as well and I will close the issue.

This was the issue I also faced. expo-modules-autolinking was at version 1.10.3, which is incompatible with expo SDK 49. I didn't want to install the version ~1.5.0 manually because that could cause version incompatibilities and other unexpected issues. So in order to downgrade to ~1.5.0 I had to find the culprit which was forcing it to version 1.10.3. Running npm ls expo-modules-autolinking@1.10.3 (if using npm) really helped me out. It showed me that the culprit was eas-cli@^7.6.0, because it was evaluating to eas-cli@7.6.2. Downgrading the eas-cli version fixed the issue.

which eas-cli version did you downgrade to? @kapobajza

kaushik1094 commented 5 months ago

@3madurya3 try and use version eas-cli 7.5.0

kaushik1094 commented 5 months ago

If the fix isn't working, I can re

Fixed it, make sure to run npx expo-doctor and make sure to install comptaible version of expo-modules-autolinking i.e ~1.5.0 is installed on your project. @abranhe please confirm it works for your team as well and I will close the issue.

If this fix isn't working for everyone, I can reopen this issue.

kaushik1094 commented 5 months ago

Just an update, I got my build to work using yarn, but I had to switch from npm to yarn and making sure I didn't have any package-lock.json file while building but this is still happening if we are using npm Build works fine if you are using yarn

also using yarn but getting this error

@bradherman if you are using expo-modules-autolinking downgrade it to 1.5.0 and also make sure you are on eas-cli@7.5.0

3madurya3 commented 5 months ago

@3madurya3 try and use version eas-cli 7.5.0

@kaushik1094 when I use eas-cli 6 and above, I get this expo doctor error: Expected package @expo/config-plugins@~7.2.2 Found invalid: @expo/config-plugins@7.8.4 @expo/config-plugins@7.8.4

And after doing npm why @expo/config-plugins, it says eas-cli is the one requiring this package version. But, expo SDK 49 requires @expo/config-plugins@~7.2.2. So, I downgraded to eas-cli 5.9.1 and it got rid of this package dependency issue. Please correct me if I'm wrong about expo SDK 49 requiring @expo/config-plugins@~7.2.2, though.

if you are using expo-modules-autolinking downgrade it to 1.5.0 and also make sure you are on eas-cli@7.5.0

For expo-modules-autolinking, isn't this the package that each package should install for themselves? I once got a warning message saying this. The package "expo-modules-autolinking" should not be installed directly in your project. It is a dependency of other Expo packages, which will install it automatically as needed. Or is it possible to require 1.5.0 for all packages being used?

kaushik1094 commented 5 months ago

@3madurya3 Expected package @expo/config-plugins@~7.2.2 Found invalid: @expo/config-plugins@7.8.4 @expo/config-plugins@7.8.4 I saw this error when I used eas-cli@6 and it's related expo-doctor version, I think this is a false alarm and latest version of expo-doctor has a fix in place. But make sure your using compatible versions of config-plugins for expo 49.

I don't think the error message relating to expo-modules-autolinking is completely right. I think it goes both ways, any expo libraries or modules will be having expo-modules-autolinking library implemented so don't have to worry if you are just using expo libraries. But you would need this in your own projects when you are using any third party react native libraries that you have installed in your project, for automating the auto linking process of the third party library with the native code which is defined in the intro of the documentation (https://docs.expo.dev/modules/autolinking/). So, if you are using any third party libraries, you will need to install expo-modules-autolinking in your project.

So, out of curiosity, were you able to downgrade the version to 1.5.0 and make it work?

3madurya3 commented 5 months ago

So, if you are using any third party libraries, you will need to install expo-modules-autolinking in your project.

I see, that makes sense. I think you're right as well, while downgrading causes that warning message, I don't think it's the cause of any of my errors in building.

I was able to get rid of the expo-doctor errors without downgrading to version 1.5.0 of expo-modules-autolinking (I downgraded to eas-cli 5.9.1 and did some other versioning changes I don't remember), so yes that part of it did work. But I don't think my 'generate-modules-provider' error came from the expo-modules-autolinking error, rather from having an upgraded version of expo-updates.

kaushik1094 commented 5 months ago

@3madurya3 That makes sense. I am assuming updated version of expo-updates might be using an updated version of expo-modules-autolinking which might have the caused the issue. I think generate-modules-provider is the issue from expo-modules-autolinking I might be wrong though.