Skip to content

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

Closed
@pushpender-singh-ap

Description

@pushpender-singh-ap

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Platform: AndroidAndroid applications.Resolution: LockedThis issue was locked by the bot.Resolution: PR SubmittedA pull request with a fix has been provided.Type: New ArchitectureIssues and PRs related to new architecture (Fabric/Turbo Modules)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions