facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.39k stars 24.36k forks source link

npx react-native run-anroid fails with error autolinkLibrariesFromCommand #47154

Open ganesh42shrma opened 1 month ago

ganesh42shrma commented 1 month ago

Description

New project created using npx react-native init Myapp . I wanted a javascript template so changed the App.tsx to App.js , installed the nodemodules I wanted using npm icommand with 0 vulnerabilities. Upon running npx react-native run-android : The error I encounter :

info Opening app on Android...
info A dev server is already running for this project on port 8081.
info Installing the app...
> Task :gradle-plugin:settings-plugin:checkKotlinGradlePluginConfigurationErrors
> Task :gradle-plugin:shared:checkKotlinGradlePluginConfigurationErrors
> Task :gradle-plugin:shared:compileKotlin UP-TO-DATE
> Task :gradle-plugin:shared:compileJava NO-SOURCE
> Task :gradle-plugin:shared:processResources NO-SOURCE
> Task :gradle-plugin:shared:classes UP-TO-DATE
> Task :gradle-plugin:shared:jar UP-TO-DATE
> Task :gradle-plugin:settings-plugin:compileKotlin UP-TO-DATE
> Task :gradle-plugin:settings-plugin:compileJava NO-SOURCE
> Task :gradle-plugin:settings-plugin:pluginDescriptors UP-TO-DATE
> Task :gradle-plugin:settings-plugin:processResources UP-TO-DATE
> Task :gradle-plugin:settings-plugin:classes UP-TO-DATE
> Task :gradle-plugin:settings-plugin:jar UP-TO-DATE
8 actionable tasks: 2 executed, 6 up-to-date

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

ERROR: autolinkLibrariesFromCommand: process cmd /c npx @react-native-community/cli config exited with error code: 1

FAILURE: Build failed with an exception.

* Where:
Settings file 'D:\newapp\wizpeerTourGuideFe\android\settings.gradle' line: 3

* What went wrong:
A problem occurred evaluating settings 'android'.
> ERROR: autolinkLibrariesFromCommand: process cmd /c npx @react-native-community/cli config exited with error code: 1

* 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 8s

package.json :

{
  "name": "wizpeerTourGuideFe",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "^2.0.0",
    "@react-native-community/cli": "^14.1.1",
    "@react-native-community/netinfo": "^11.4.1",
    "axios": "^1.7.7",
    "body-parser": "^1.20.3",
    "date-fns": "^4.1.0",
    "jwt-decode": "^4.0.0",
    "lottie-react-native": "^7.0.0",
    "moment": "^2.30.1",
    "react": "^18.3.1",
    "react-native": "^0.75.4",
    "react-native-calendars": "^1.1307.0",
    "react-native-chart-kit": "^6.12.0",
    "react-native-compressor": "^1.9.0",
    "react-native-device-info": "^13.1.0",
    "react-native-document-picker": "^9.3.1",
    "react-native-fs": "^2.20.0",
    "react-native-gifted-chat": "^2.6.4",
    "react-native-htmlview": "^0.17.0",
    "react-native-http-bridge-refurbished": "^1.2.9",
    "react-native-image-base64": "^0.1.4",
    "react-native-image-crop-picker": "^0.41.4",
    "react-native-image-picker": "^7.1.2",
    "react-native-keep-awake": "^4.0.0",
    "react-native-network-info": "^5.2.1",
    "react-native-paper": "^5.12.5",
    "react-native-permissions": "^5.0.1",
    "react-native-popup-menu": "^0.16.1",
    "react-native-safe-area-context": "^4.11.1",
    "react-native-share": "^11.0.4",
    "react-native-sqlite-storage": "^6.0.1",
    "react-native-svg": "^15.8.0",
    "react-native-swiper-flatlist": "^3.2.5",
    "react-native-vector-icons": "^10.2.0",
    "react-native-video": "^6.7.0",
    "react-native-view-shot": "^3.8.0",
    "wizpeerTourGuideFe": "file:"
  },
  "devDependencies": {
    "@babel/core": "^7.25.8",
    "@babel/preset-env": "^7.25.8",
    "@babel/runtime": "^7.25.7",
    "@react-native/babel-preset": "^0.75.4",
    "@react-native/eslint-config": "^0.75.4",
    "@react-native/metro-config": "^0.75.4",
    "@react-native/typescript-config": "0.75.4",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.7.0",
    "eslint": "^8.57.1",
    "jest": "^29.7.0",
    "prettier": "^2.8.8",
    "react-test-renderer": "^18.3.1"
  },
  "engines": {
    "node": ">=18"
  }
}

Settings.gradle file :

pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'wizpeerTourGuideFe'
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')

Steps to reproduce

npx react-native init yourApp

convert App.tsx to App.js with js code.

install node modules from package.json or with these commands :

npm install @react-native-async-storage/async-storage @react-native-community/netinfo axios body-parser date-fns jwt-decode lottie-react-native moment react react-native react-native-calendars react-native-chart-kit react-native-compressor react-native-device-info react-native-document-picker react-native-fs react-native-gifted-chat react-native-htmlview react-native-http-bridge-refurbished react-native-image-base64 react-native-image-crop-picker react-native-image-picker react-native-keep-awake react-native-network-info react-native-paper react-native-permissions react-native-popup-menu react-native-safe-area-context react-native-share react-native-sqlite-storage react-native-svg react-native-swiper-flatlist react-native-vector-icons react-native-video react-native-view-shot wizpeerTourGuideFe --save and npm install @babel/core @babel/preset-env @babel/runtime @react-native/babel-preset @react-native/eslint-config @react-native/metro-config babel-jest eslint jest prettier react-test-renderer --save-dev run npx react-native start and then npx react-native run-android

React Native Version

0.75.4

Affected Platforms

Runtime - Android

Output of npx react-native info

warn Package react-native-sqlite-storage contains invalid configuration: "dependency.platforms.ios.project" is not allowed. Please verify it's properly linked using "npx react-native config" command and contact the package maintainers about this.
info Fetching system and libraries information...
System:
  OS: Windows 10 10.0.19045
  CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  Memory: 3.15 GB / 15.88 GB
Binaries:
  Node:
    version: 20.18.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn: Not Found
  npm:
    version: 10.9.0
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK:
    API Levels:
      - "33"
      - "34"
    Build Tools:
      - 34.0.0
      - 35.0.0
    System Images:
      - android-35 | Google Play Intel x86_64 Atom
    Android NDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: AI-242.23339.11.2421.12483815
  Visual Studio: Not Found
Languages:
  Java: 17.0.12
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

Settings file 'D:\newapp\wizpeerTourGuideFe\android\settings.gradle' line: 3

A problem occurred evaluating settings 'android'.
> ERROR: autolinkLibrariesFromCommand: process cmd /c npx @react-native-community/cli config exited with error code: 1

* Try:
> 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.

* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating settings 'android'.
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
    at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.lambda$apply$0(DefaultScriptPluginFactory.java:137)
    at org.gradle.configuration.DefaultScriptTarget.addConfiguration(DefaultScriptTarget.java:74)
    at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:140)
    at org.gradle.configuration.BuildOperationScriptPlugin$1.run(BuildOperationScriptPlugin.java:68)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
    at org.gradle.configuration.BuildOperationScriptPlugin.lambda$apply$0(BuildOperationScriptPlugin.java:65)
    at org.gradle.internal.code.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:43)
    at org.gradle.configuration.BuildOperationScriptPlugin.apply(BuildOperationScriptPlugin.java:65)
    at org.gradle.initialization.ScriptEvaluatingSettingsProcessor.applySettingsScript(ScriptEvaluatingSettingsProcessor.java:75)
    at org.gradle.initialization.ScriptEvaluatingSettingsProcessor.process(ScriptEvaluatingSettingsProcessor.java:68)
    at org.gradle.initialization.SettingsEvaluatedCallbackFiringSettingsProcessor.process(SettingsEvaluatedCallbackFiringSettingsProcessor.java:34)
    at org.gradle.initialization.RootBuildCacheControllerSettingsProcessor.process(RootBuildCacheControllerSettingsProcessor.java:47)
    at org.gradle.initialization.BuildOperationSettingsProcessor$2.call(BuildOperationSettingsProcessor.java:49)
    at org.gradle.initialization.BuildOperationSettingsProcessor$2.call(BuildOperationSettingsProcessor.java:46)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.initialization.BuildOperationSettingsProcessor.process(BuildOperationSettingsProcessor.java:46)
    at org.gradle.initialization.DefaultSettingsLoader.findSettingsAndLoadIfAppropriate(DefaultSettingsLoader.java:143)
    at org.gradle.initialization.DefaultSettingsLoader.findAndLoadSettings(DefaultSettingsLoader.java:63)
    at org.gradle.initialization.SettingsAttachingSettingsLoader.findAndLoadSettings(SettingsAttachingSettingsLoader.java:33)
    at org.gradle.internal.composite.CommandLineIncludedBuildSettingsLoader.findAndLoadSettings(CommandLineIncludedBuildSettingsLoader.java:35)
    at org.gradle.internal.composite.ChildBuildRegisteringSettingsLoader.findAndLoadSettings(ChildBuildRegisteringSettingsLoader.java:44)
    at org.gradle.internal.composite.CompositeBuildSettingsLoader.findAndLoadSettings(CompositeBuildSettingsLoader.java:35)
    at org.gradle.initialization.InitScriptHandlingSettingsLoader.findAndLoadSettings(InitScriptHandlingSettingsLoader.java:33)
    at org.gradle.api.internal.initialization.CacheConfigurationsHandlingSettingsLoader.findAndLoadSettings(CacheConfigurationsHandlingSettingsLoader.java:36)
    at org.gradle.initialization.GradlePropertiesHandlingSettingsLoader.findAndLoadSettings(GradlePropertiesHandlingSettingsLoader.java:38)
    at org.gradle.initialization.DefaultSettingsPreparer.prepareSettings(DefaultSettingsPreparer.java:31)
    at org.gradle.initialization.BuildOperationFiringSettingsPreparer$LoadBuild.doLoadBuild(BuildOperationFiringSettingsPreparer.java:71)
    at org.gradle.initialization.BuildOperationFiringSettingsPreparer$LoadBuild.run(BuildOperationFiringSettingsPreparer.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
    at org.gradle.initialization.BuildOperationFiringSettingsPreparer.prepareSettings(BuildOperationFiringSettingsPreparer.java:54)
    at org.gradle.initialization.VintageBuildModelController.lambda$prepareSettings$1(VintageBuildModelController.java:80)
    at org.gradle.internal.model.StateTransitionController.lambda$doTransition$14(StateTransitionController.java:255)
    at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:266)
    at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:254)
    at org.gradle.internal.model.StateTransitionController.lambda$transitionIfNotPreviously$11(StateTransitionController.java:213)
    at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:34)
    at org.gradle.internal.model.StateTransitionController.transitionIfNotPreviously(StateTransitionController.java:209)
    at org.gradle.initialization.VintageBuildModelController.prepareSettings(VintageBuildModelController.java:80)
    at org.gradle.initialization.VintageBuildModelController.getLoadedSettings(VintageBuildModelController.java:57)
    at org.gradle.internal.model.StateTransitionController.lambda$notInState$3(StateTransitionController.java:132)
    at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44)
    at org.gradle.internal.model.StateTransitionController.notInState(StateTransitionController.java:128)
    at org.gradle.internal.build.DefaultBuildLifecycleController.loadSettings(DefaultBuildLifecycleController.java:118)
    at org.gradle.internal.build.AbstractBuildState.ensureProjectsLoaded(AbstractBuildState.java:117)
    at org.gradle.plugins.ide.internal.tooling.GradleBuildBuilder.create(GradleBuildBuilder.java:58)
    at org.gradle.plugins.ide.internal.tooling.GradleBuildBuilder.create(GradleBuildBuilder.java:38)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuildScopedBuilder.build(DefaultToolingModelBuilderRegistry.java:207)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuildOperationWrappingBuilder$1.call(DefaultToolingModelBuilderRegistry.java:338)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuildOperationWrappingBuilder.build(DefaultToolingModelBuilderRegistry.java:335)
    at org.gradle.internal.build.DefaultBuildToolingModelController$AbstractToolingScope.getModel(DefaultBuildToolingModelController.java:83)
    at org.gradle.tooling.internal.provider.runner.DefaultBuildController.getModel(DefaultBuildController.java:112)
    at org.gradle.tooling.internal.consumer.connection.ParameterAwareBuildControllerAdapter.getModel(ParameterAwareBuildControllerAdapter.java:40)
    at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.getModel(UnparameterizedBuildController.java:116)
    at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.getModel(NestedActionAwareBuildControllerAdapter.java:32)
    at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.getModel(UnparameterizedBuildController.java:79)
    at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.getModel(NestedActionAwareBuildControllerAdapter.java:32)
    at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.getBuildModel(UnparameterizedBuildController.java:74)
    at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.getBuildModel(NestedActionAwareBuildControllerAdapter.java:32)
    at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.lambda$initAction$5(GradleModelFetchAction.java:181)
    at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.callWithSpan(GradleOpenTelemetry.java:73)
    at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.callWithSpan(GradleOpenTelemetry.java:61)
    at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.initAction(GradleModelFetchAction.java:180)
    at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.doExecute(GradleModelFetchAction.java:138)
    at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.lambda$execute$1(GradleModelFetchAction.java:103)
    at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.callWithSpan(GradleOpenTelemetry.java:73)
    at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.callWithSpan(GradleOpenTelemetry.java:61)
    at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.lambda$execute$2(GradleModelFetchAction.java:102)
    at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.withOpenTelemetry(GradleModelFetchAction.java:113)
    at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.lambda$execute$3(GradleModelFetchAction.java:101)
    at com.intellij.gradle.toolingExtension.impl.util.GradleExecutorServiceUtil.withSingleThreadExecutor(GradleExecutorServiceUtil.java:18)
    at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.execute(GradleModelFetchAction.java:100)
    at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.execute(GradleModelFetchAction.java:36)
    at org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter.execute(InternalBuildActionAdapter.java:65)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.runAction(AbstractClientProvidedBuildActionRunner.java:131)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.beforeTasks(AbstractClientProvidedBuildActionRunner.java:99)
    at org.gradle.internal.buildtree.DefaultBuildTreeModelCreator.beforeTasks(DefaultBuildTreeModelCreator.java:43)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$fromBuildModel$2(DefaultBuildTreeLifecycleController.java:83)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$runBuild$4(DefaultBuildTreeLifecycleController.java:120)
    at org.gradle.internal.model.StateTransitionController.lambda$transition$6(StateTransitionController.java:169)
    at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:266)
    at org.gradle.internal.model.StateTransitionController.lambda$transition$7(StateTransitionController.java:169)
    at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44)
    at org.gradle.internal.model.StateTransitionController.transition(StateTransitionController.java:169)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.runBuild(DefaultBuildTreeLifecycleController.java:117)
    at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.fromBuildModel(DefaultBuildTreeLifecycleController.java:82)
    at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner.runClientAction(AbstractClientProvidedBuildActionRunner.java:43)
    at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner.run(ClientProvidedPhasedActionRunner.java:53)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:49)
    at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:65)
    at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:140)
    at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
    at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:40)
    at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:123)
    at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:40)
    at org.gradle.internal.buildtree.InitDeprecationLoggingActionExecutor.execute(InitDeprecationLoggingActionExecutor.java:66)
    at org.gradle.internal.buildtree.InitProblems.execute(InitProblems.java:36)
    at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40)
    at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:71)
    at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:60)
    at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:71)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57)
    at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:36)
    at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:264)
    at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:128)
    at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:36)
    at org.gradle.tooling.internal.provider.continuous.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:110)
    at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64)
    at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:92)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:80)
    at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:71)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:62)
    at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:41)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:64)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:32)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:51)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:39)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.lambda$execute$0(ForwardClientInput.java:39)
    at org.gradle.launcher.daemon.server.clientinput.ClientInputForwarder.forwardInput(ClientInputForwarder.java:88)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:36)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:64)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
Caused by: org.gradle.api.GradleException: ERROR: autolinkLibrariesFromCommand: process cmd /c npx @react-native-community/cli config exited with error code: 1
    at com.facebook.react.ReactSettingsExtension$Companion.checkAndUpdateCache$settings_plugin(ReactSettingsExtension.kt:165)
    at com.facebook.react.ReactSettingsExtension.autolinkLibrariesFromCommand(ReactSettingsExtension.kt:71)
    at com.facebook.react.ReactSettingsExtension.autolinkLibrariesFromCommand$default(ReactSettingsExtension.kt:48)
    at com.facebook.react.ReactSettingsExtension.autolinkLibrariesFromCommand(ReactSettingsExtension.kt)
    at com.facebook.react.ReactSettingsExtension$autolinkLibrariesFromCommand.call(Unknown Source)
    at settings_37ns8d3l48o1ph4dqcwvp93yb$_run_closure1.doCall$original(D:\newapp\wizpeerTourGuideFe\android\settings.gradle:3)
    at settings_37ns8d3l48o1ph4dqcwvp93yb$_run_closure1.doCall(D:\newapp\wizpeerTourGuideFe\android\settings.gradle)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
    at jdk.proxy1/jdk.proxy1.$Proxy125.execute(Unknown Source)
    at org.gradle.internal.extensibility.ExtensionsStorage$ExtensionHolder.configure(ExtensionsStorage.java:177)
    at org.gradle.internal.extensibility.ExtensionsStorage.configureExtension(ExtensionsStorage.java:70)
    at org.gradle.internal.extensibility.DefaultConvention.configure(DefaultConvention.java:202)
    at org.gradle.internal.extensibility.DefaultConvention.configure(DefaultConvention.java:197)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
    at settings_37ns8d3l48o1ph4dqcwvp93yb.run(D:\newapp\wizpeerTourGuideFe\android\settings.gradle:3)
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
    ... 179 more

>> Ask Gemini ERROR: autolinkLibrariesFromCommand: process cmd /c npx @react-native-community/cli config exited with error code: 1

Reproducer

create using above commands and install the packages and run.

Screenshots and Videos

No response

react-native-bot commented 1 month ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
react-native-bot commented 1 month ago
:warning: Add or Reformat Version Info
:information_source: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.70.2
react-native-bot commented 1 month ago
:warning: Add or Reformat Version Info
:information_source: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.70.2
react-native-bot commented 1 month ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
cortinico commented 1 month ago

Can you run npx @react-native-community/cli config in your project root and share the output?

Pratik-2102 commented 1 month ago

@cortinico this is what I am getting

{
  "root": "/Users/townscup/Documents/ReactNativeTownCup",
  "reactNativePath": "/Users/townscup/Documents/ReactNativeTownCup/node_modules/react-native",
  "reactNativeVersion": "0.76",
  "dependencies": {
    "react-native-config": {
      "root": "/Users/townscup/Documents/ReactNativeTownCup/node_modules/react-native-config",
      "name": "react-native-config",
      "platforms": {
        "android": {
          "sourceDir": "./node_modules/react-native-config/android",
          "buildTypes": []
        }
      }
    }
  },
  "commands": [
    {
      "name": "generate-bootsplash <logo>",
      "description": "Generate a launch screen using a logo file path (PNG or SVG)",
      "options": [
        {
          "name": "--project-type <string>",
          "description": "Project type (\"detect\", \"bare\" or \"expo\")",
          "default": "detect"
        },
        {
          "name": "--platforms <list>",
          "description": "Platforms to generate for, separated by a comma",
          "default": "android,ios,web"
        },
        {
          "name": "--background <string>",
          "description": "Background color (in hexadecimal format)",
          "default": "#fff"
        },
        {
          "name": "--logo-width <number>",
          "description": "Logo width at @1x (in dp - we recommend approximately ~100)",
          "default": 100
        },
        {
          "name": "--assets-output <string>",
          "description": "Assets output directory path",
          "default": "assets/bootsplash"
        },
        {
          "name": "--flavor <string>",
          "description": "Android flavor build variant (where your resource directory is)",
          "default": "main"
        },
        {
          "name": "--html <string>",
          "description": "HTML template file path (your web app entry point)",
          "default": "public/index.html"
        },
        {
          "name": "--license-key <string>",
          "description": "License key to enable brand and dark mode assets generation"
        },
        {
          "name": "--brand <string>",
          "description": "Brand file path (PNG or SVG)"
        },
        {
          "name": "--brand-width <number>",
          "description": "Brand width at @1x (in dp - we recommend approximately ~80)",
          "default": 80
        },
        {
          "name": "--dark-background <string>",
          "description": "[dark mode] Background color (in hexadecimal format)"
        },
        {
          "name": "--dark-logo <string>",
          "description": "[dark mode] Logo file path (PNG or SVG)"
        },
        {
          "name": "--dark-brand <string>",
          "description": "[dark mode] Brand file path (PNG or SVG)"
        }
      ]
    },
    {
      "name": "bundle",
      "description": "Build the bundle for the provided JavaScript entry file.",
      "options": [
        {
          "name": "--entry-file <path>",
          "description": "Path to the root JS file, either absolute or relative to JS root"
        },
        {
          "name": "--platform <string>",
          "description": "Either \"ios\" or \"android\"",
          "default": "ios"
        },
        {
          "name": "--transformer <string>",
          "description": "Specify a custom transformer to be used"
        },
        {
          "name": "--dev [boolean]",
          "description": "If false, warnings are disabled and the bundle is minified",
          "default": true
        },
        {
          "name": "--minify [boolean]",
          "description": "Allows overriding whether bundle is minified. This defaults to false if dev is true, and true if dev is false. Disabling minification can be useful for speeding up production builds for testing purposes."
        },
        {
          "name": "--bundle-output <string>",
          "description": "File name where to store the resulting bundle, ex. /tmp/groups.bundle"
        },
        {
          "name": "--bundle-encoding <string>",
          "description": "Encoding the bundle should be written in (https://nodejs.org/api/buffer.html#buffer_buffer).",
          "default": "utf8"
        },
        {
          "name": "--max-workers <number>",
          "description": "Specifies the maximum number of workers the worker-pool will spawn for transforming files. This defaults to the number of the cores available on your machine."
        },
        {
          "name": "--sourcemap-output <string>",
          "description": "File name where to store the sourcemap file for resulting bundle, ex. /tmp/groups.map"
        },
        {
          "name": "--sourcemap-sources-root <string>",
          "description": "Path to make sourcemap's sources entries relative to, ex. /root/dir"
        },
        {
          "name": "--sourcemap-use-absolute-path",
          "description": "Report SourceMapURL using its full path",
          "default": false
        },
        {
          "name": "--assets-dest <string>",
          "description": "Directory name where to store assets referenced in the bundle"
        },
        {
          "name": "--unstable-transform-profile <string>",
          "description": "Experimental, transform JS for a specific JS engine. Currently supported: hermes, hermes-canary, default",
          "default": "default"
        },
        {
          "name": "--asset-catalog-dest [string]",
          "description": "Path where to create an iOS Asset Catalog for images"
        },
        {
          "name": "--reset-cache",
          "description": "Removes cached files",
          "default": false
        },
        {
          "name": "--read-global-cache",
          "description": "Try to fetch transformed JS code from the global cache, if configured.",
          "default": false
        },
        {
          "name": "--config <string>",
          "description": "Path to the CLI configuration file"
        },
        {
          "name": "--resolver-option <string...>",
          "description": "Custom resolver options of the form key=value. URL-encoded. May be specified multiple times."
        }
      ]
    },
    {
      "name": "start",
      "description": "Start the React Native development server.",
      "options": [
        {
          "name": "--port <number>"
        },
        {
          "name": "--host <string>",
          "default": ""
        },
        {
          "name": "--projectRoot <path>",
          "description": "Path to a custom project root"
        },
        {
          "name": "--watchFolders <list>",
          "description": "Specify any additional folders to be added to the watch list"
        },
        {
          "name": "--assetPlugins <list>",
          "description": "Specify any additional asset plugins to be used by the packager by full filepath"
        },
        {
          "name": "--sourceExts <list>",
          "description": "Specify any additional source extensions to be used by the packager"
        },
        {
          "name": "--max-workers <number>",
          "description": "Specifies the maximum number of workers the worker-pool will spawn for transforming files. This defaults to the number of the cores available on your machine."
        },
        {
          "name": "--transformer <string>",
          "description": "Specify a custom transformer to be used"
        },
        {
          "name": "--reset-cache, --resetCache",
          "description": "Removes cached files"
        },
        {
          "name": "--custom-log-reporter-path, --customLogReporterPath <string>",
          "description": "Path to a JavaScript file that exports a log reporter as a replacement for TerminalReporter"
        },
        {
          "name": "--https",
          "description": "Enables https connections to the server"
        },
        {
          "name": "--key <path>",
          "description": "Path to custom SSL key"
        },
        {
          "name": "--cert <path>",
          "description": "Path to custom SSL cert"
        },
        {
          "name": "--config <string>",
          "description": "Path to the CLI configuration file"
        },
        {
          "name": "--no-interactive",
          "description": "Disables interactive mode"
        }
      ]
    },
    {
      "name": "codegen",
      "options": [
        {
          "name": "--path <path>",
          "description": "Path to the React Native project root.",
          "default": "/Users/townscup/Documents/ReactNativeTownCup"
        },
        {
          "name": "--platform <string>",
          "description": "Target platform. Supported values: \"android\", \"ios\", \"all\".",
          "default": "all"
        },
        {
          "name": "--outputPath <path>",
          "description": "Path where generated artifacts will be output to."
        }
      ]
    }
  ],
  "healthChecks": [],
  "platforms": {},
  "assets": [
    "./src/assets/fonts"
  ],
  "project": {}
}
cortinico commented 4 weeks ago

Ok then we would need a full reproducer to help further

react-native-bot commented 5 days ago

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.