Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh React Native Project Failing: autolinkLibrariesFromCommand Error #2527

Open
DEveL0perLuckY opened this issue Oct 14, 2024 Discussed in #2526 · 2 comments
Open

Fresh React Native Project Failing: autolinkLibrariesFromCommand Error #2527

DEveL0perLuckY opened this issue Oct 14, 2024 Discussed in #2526 · 2 comments

Comments

@DEveL0perLuckY
Copy link

Discussed in #2526

Originally posted by DEveL0perLuckY October 14, 2024

Problem Description

I am facing issues while creating a fresh React Native project. The error occurs during the autolinking process:

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

This error appears when running the project, and the build fails with the following details:

Settings file:
C:\Users\lucky\Desktop\HealthCare\android\settings.gradle (line: 3)

Error Message:

FAILURE: Build failed with an exception.

* Where:
Settings file 'C:\Users\lucky\Desktop\HealthCare\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 14s
info Run CLI with --verbose flag for more details.

Attempts to Resolve the Issue

  1. Tried Using an Older Version:

    • When using an older version of React Native, I encountered a similar issue:
      :ReactNative:Running '[node, C:\Users\lucky\Desktop\newproject\node_modules\@react-native-community\cli\build\bin.js, config]' command failed.
      
      FAILURE: Build failed with an exception.
      
      * Where:
      Script 'C:\Users\lucky\Desktop\newproject\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
      
      BUILD FAILED in 8s
      
  2. Development Environment Setup:

    • I have verified my development environment setup using:
      npx react-native doctor
      
    • No major issues were found with the setup.

Additional Details

  • React Native Version: Tried with both v0.74.2 and v0.75.4
  • Error on Latest Version: The same error (autolinkLibrariesFromCommand failure) occurs on the latest version.
  • OS: Windows

Any suggestions for resolving this issue would be greatly appreciated.
image

@pranay202
Copy link

Use expo, react native cli is dead!

@thymikee
Copy link
Member

What’s returned when you run the command listed there:
node C:\Users\lucky\Desktop\newproject\node_modules\@react-native-community\cli\build\bin.js config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants