question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fails to run react-native run-android (v0.68.0) without yarn

See original GitHub issue

Description

when I create a test project and enable new architecture and Hermes it’s giving me this type error below:-

NOTE:- I KNOW I DON’T HAVE YARN (i love using npm that’s why I don’t install yarn in my system maybe this error is fixed after yarn install but it does not mean we can’t run our project through npm)

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 936 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
info Installing the app...

> Configure project :app
Unable to detect AGP versions for included builds. All projects in the build should use the same AGP version. Class name for the included build object: org.gradle.composite.internal.DefaultIncludedBuild$IncludedBuildImpl_Decorated.

> Task :ReactAndroid:generateCodegenSchemaFromJavaScript FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
9 actionable tasks: 1 executed, 8 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ReactAndroid:generateCodegenSchemaFromJavaScript'.
> A problem occurred starting process 'command 'yarn''

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 6s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ReactAndroid:generateCodegenSchemaFromJavaScript'.
> A problem occurred starting process 'command 'yarn''

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 6s

    at makeError (/Users/pushpendersingh/Desktop/Projects/RN/testV68/node_modules/@react-native-community/cli-platform-android/node_modules/execa/index.js:174:9)
    at /Users/pushpendersingh/Desktop/Projects/RN/testV68/node_modules/@react-native-community/cli-platform-android/node_modules/execa/index.js:278:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOnAllDevices (/Users/pushpendersingh/Desktop/Projects/RN/testV68/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
    at async Command.handleAction (/usr/local/lib/node_modules/@react-native-community/cli/build/index.js:192:9)
info Run CLI with --verbose flag for more details.

Version

0.68.0

Output of npx react-native info

info Fetching system and libraries information… System: OS: macOS 12.3 CPU: (8) arm64 Apple M1 Memory: 89.94 MB / 8.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.14.0 - /usr/local/bin/node Yarn: Not Found npm: 8.3.1 - /usr/local/bin/npm Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: API Levels: 28, 30, 31, 32 Build Tools: 30.0.2, 32.0.0, 32.1.0, 33.0.0 System Images: android-32 | Google APIs ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8193401 Xcode: 13.3/13E113 - /usr/bin/xcodebuild Languages: Java: 12.0.2 - /Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home/bin//javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.0 => 0.68.0 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

  1. react-native init test
  2. cd test
  3. enable newArchEnabled=true (gradle.properties)
  4. enable enableHermes: true (build.gradle)
  5. react-native run-android (when the yarn is not installed on the system)

Snack, code example, screenshot, or link to a repository

Github Repo:- https://github.com/pushpender-singh-ap/testV68

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:19 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
pushpender-singh-apcommented, Apr 21, 2022

version 0.68.1 this issue has been resolved.

1reaction
FayyazAliKhan1commented, Jun 1, 2022

Sorry for the late reply @pushpender-singh-ap, in the latest version 0.68.2 i am facing this issue https://github.com/facebook/react-native/issues/33944 it is in latest version Kindly look into it please Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

app:checkDebugAarMetadata FAILED when run react-native ...
To do so, in your package.json change react-native's version to the relevant new patch (ex. if you are on 0.64.3, change to 0.64.4)...
Read more >
Speeding up your Build phase - React Native
Run a full build before without --active-arch-only . Subsequent builds with --active-arch-only will work correctly. Add an abiFilter block ...
Read more >
react-native | Yarn - Package Manager
React Native brings React's declarative UI framework to iOS and Android. With React Native, you use native UI controls and have full access...
Read more >
Failed to run React Native App - Zoom Developer Forum
Description Hello, i did all the steps to implement VideoSDK in react native project version 0.69.5 after i try to run my project...
Read more >
react-native - npm
Start using react-native in your project by running `npm i ... React Native brings React's declarative UI framework to iOS and Android.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found