skip to Main Content

I accidentally unlinked react-native-reanimated from my App and started getting this error. Also worth mentioning I just upgraded to mac OS Ventura 13.2.1

npx react-native start failing build

I tried cd android && ./gradlew clean to fix this issue and it seems it is in there is something wrong with reanimated package

The full error log:


> Configure project :react-native-reanimated
No AAR for react-native-reanimated found. Attempting to build from source.
Android gradle plugin: 7.3.1
Gradle: 7.5.1
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.

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.5.1/userguide/command_line_interface.html#sec:command_line_warnings
5 actionable tasks: 5 executed

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':react-native-reanimated'.
> Cannot invoke "String.startsWith(String)" because "versionOutput" is null

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

Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':react-native-reanimated'.
> Cannot invoke "String.startsWith(String)" because "versionOutput" is null

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

I have the package in my package.json:

    "react-native-reanimated": "^3.0.2",

I also have it in plugins in babel.config.js

['react-native-reanimated/plugin', {
    "relativeSourceLocation": true
  }]

I could not find any similar error log online.

When I do npm install it shows:

up to date, audited 1411 packages in 1s

Edit: A friend cloned my repo and everything worked well for them. What can I reinstall to avoid this error on my machine?

2

Answers


  1. Chosen as BEST ANSWER

    I rolled back reacti-native-reanimated to version 2.14.4 in package.json


  2. Is the react-native-reanimated plugin listed last in babel.config.js?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search