cli icon indicating copy to clipboard operation
cli copied to clipboard

Build Failed

Open Xfhe55 opened this issue 1 year ago • 1 comments

error Failed to launch emulator. Reason: The emulator (INFO | Storing crashdata in: C:\Users\cinar\AppData\Local\Temp\AndroidEmulator\emu-crash-35.1.1.db, detection is enabled for process: 90424) quit before it finished opening. You can try starting the emulator manually from the terminal with: C:\Users\cinar\AppData\Local\Android\Sdk/emulator/emulator @INFO | Storing crashdata in: C:\Users\cinar\AppData\Local\Temp\AndroidEmulator\emu-crash-35.1.1.db, detection is enabled for process: 90424. warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch. info Installing the app...

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor

:ReactNative:Running '[node, C:\Users\cinar\OneDrive\Masaüstü\turkce-sozluk-master\node_modules@react-native-community\cli\build\bin.js, config]' command failed.

FAILURE: Build failed with an exception.

  • Where: Script 'C:\Users\cinar\OneDrive\Masa�st�\turkce-sozluk-master\node_modules@react-native-community\cli-platform-android\native_modules.gradle' line: 401

  • What went wrong: A problem occurred evaluating script.

Process 'command 'node'' finished with non-zero exit value 1

Xfhe55 avatar May 28 '24 18:05 Xfhe55

Facing this same error, whenever I run npx-react-native run-android command.

- I always have to delete my node-modules folder, and reinstall them again, then it works.

If someone got a better solution, please let us know.

Thank you.

Usama-Saud avatar May 29 '24 08:05 Usama-Saud

hey, please make sure that npx react-native config works and outputs correct config ✅

szymonrybczak avatar Jun 03 '24 08:06 szymonrybczak

hey, please make sure that npx react-native config works and outputs correct config ✅

Thank you @szymonrybczak ! This command helped me identify a strange error in an old project running .69.12.

Suddenly it has been impossibile to sync gradle correctly and I ended up debugging the react-native-cli bin.js file to identify the issue, only to then find that the error was thrown by the config package that detected a broken configuration in react-native-maps. This package is missing package="com.rnmaps.maps" in AndroidManifest and the config plugin is throwing because at version 8.0.0 it requires it.

gladiuscode avatar Jun 05 '24 15:06 gladiuscode

hey @gladiuscode, make sure you're using react-native-maps with updated version so it contains correct manifests :) I think this the one that you want to use.

szymonrybczak avatar Jun 18 '24 09:06 szymonrybczak

I had this error running on a old project running 0.69.11 react-native version. Fixing react-native-maps 1.13.0 version fixes this problem.

GabeConsalter avatar Jun 20 '24 12:06 GabeConsalter

To those who are still having this issue. Make sure the package name is included in your manifest of the AndroidManifest.xml file under ./android/app/src/main/AndroidManifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.yourapp">

to make sure you are writing the correct package. you can check from ./android/app/build.gradle and check for android > defaultConfig > applicationId

It must be com.yourapp there as well

mohamad-kaddoura avatar Aug 30 '24 02:08 mohamad-kaddoura

i am facing the exact same issue while building using eas cli :ReactNative:Running '[node, /home/expo/workingdir/build/node_modules/@react-native-community/cli/build/bin.js, config]' command failed. FAILURE: Build failed with an exception.

  • Where: Script '/home/expo/workingdir/build/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 401 Any help or guidance i'd be so grateful !

Sabaa-Abdennabi avatar Aug 30 '24 11:08 Sabaa-Abdennabi

hey @Sabaa-Abdennabi, you can try debugging it by running npx react-native config in the root directory of your project

szymonrybczak avatar Aug 30 '24 11:08 szymonrybczak

:ReactNative:Running '[node, /home/expo/workingdir/build/node_modules/@react-native-community/cli/build/bin.js, config]' command failed. FAILURE: Build failed with an exception.

  • Where: Script '/home/expo/workingdir/build/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 401

I am getting this issue when building for Android.

eas build -p android

Hatsuya1993 avatar Sep 01 '24 04:09 Hatsuya1993

I was facing the same issue, but when I added the @react-native-community/cli command to package.json, both of my apps started working again. It might be that some dependencies or modules were corrupted or not linked properly, but I’m not exactly sure what happened.

avinash-capsitech avatar Sep 03 '24 12:09 avinash-capsitech

Alright finally managed to build for android after days of debugging. Apparently there was a dependency in my package.json called {project_name}: ":file". I wasn't sure how it got there in the first place. Deleting the dependency was also an issue as it keeps reappearing after I save the file. The only way to remove it is using the command npm uninstall {project_name}.

Hatsuya1993 avatar Sep 03 '24 14:09 Hatsuya1993

Alright finally managed to build for android after days of debugging. Apparently there was a dependency in my package.json called {project_name}: ":file". I wasn't sure how it got there in the first place. Deleting the dependency was also an issue as it keeps reappearing after I save the file. The only way to remove it is using the command npm uninstall {project_name}.

Thank you so much you saveddd meeeee

Sabaa-Abdennabi avatar Sep 13 '24 10:09 Sabaa-Abdennabi

Alright finally managed to build for android after days of debugging. Apparently there was a dependency in my package.json called {project_name}: ":file". I wasn't sure how it got there in the first place. Deleting the dependency was also an issue as it keeps reappearing after I save the file. The only way to remove it is using the command npm uninstall {project_name}.

Nice, saved me also.

OrleansRibeiro avatar Oct 03 '24 00:10 OrleansRibeiro

Alright finally managed to build for android after days of debugging. Apparently there was a dependency in my package.json called {project_name}: ":file". I wasn't sure how it got there in the first place. Deleting the dependency was also an issue as it keeps reappearing after I save the file. The only way to remove it is using the command npm uninstall {project_name}.

Thank you it was the same for me. Appeared in an unrelated commit of a colleague. Do we have any idea how this pops up?

vkourtis avatar Oct 07 '24 12:10 vkourtis

Alright finally managed to build for android after days of debugging. Apparently there was a dependency in my package.json called {project_name}: ":file". I wasn't sure how it got there in the first place. Deleting the dependency was also an issue as it keeps reappearing after I save the file. The only way to remove it is using the command npm uninstall {project_name}.

You are a hero

kbrattli avatar Nov 02 '24 21:11 kbrattli

Alright finally managed to build for android after days of debugging. Apparently there was a dependency in my package.json called {project_name}: ":file". I wasn't sure how it got there in the first place. Deleting the dependency was also an issue as it keeps reappearing after I save the file. The only way to remove it is using the command npm uninstall {project_name}.

Thank u soo much

pragya-dbq avatar Nov 03 '24 16:11 pragya-dbq

Alright finally managed to build for android after days of debugging. Apparently there was a dependency in my package.json called {project_name}: ":file". I wasn't sure how it got there in the first place. Deleting the dependency was also an issue as it keeps reappearing after I save the file. The only way to remove it is using the command npm uninstall {project_name}.

Thank u sir, you save my life

ThanhNhan03 avatar Dec 03 '24 00:12 ThanhNhan03