Error when running react-native run-android

  1. SDK Version: >=44.0.0-0 <45.0.0
  2. Platforms(Android/iOS/web/all): Android
  3. expo-cli: 5.0.3
  4. node: 16.13.2

Hi,

I am trying to create a react-native app with expo but it always fails when I am trying to run react-native run-android.

I am creating a react-native with : npx react-native init MyAppName --version 0.66.0
I run react-native run-android to check if everything is alright => all good
Then I followed the documentation of Expo.dev to install expo in my react-native app by running npx install-expo-modules
Then I try to run the app by running react-native run-android and I have an error:
ENOENT: no such file or directory, open d:…\MyAppName\node_modules\expo-constants\android\build\generated\assets\expo-constants\debug\app.config

I tried to launch cd android && gradlew clean but it does not solve the error.
I also tried the manual installation by running npm install expo and then following the steps of the documentation but I still have the same exact error.

Does someone have a solution ?
Thank you

Use expo init my-app instead of npx react-native init my-app, then everything is configured automatically.

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