I am trying to run ./gradlew clean on my React Native project running React Native 81, but I am getting this error:
* What went wrong:
A problem occurred evaluating root project 'my_project'.
> Failed to apply plugin 'com.facebook.react.rootproject'.
> A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
> /Users/me/Documents/projects/my_project/my_project/node_modules/react-native/sdks/hermes-engine/version.properties (No such file or directory)
* 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.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.14.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
I found the solution to this for in the library:
"@types/react-native": "^0.73.0"
My package was deprecated, which caused the error. The newer version of React Native has this library built in. It looks like in mid-October there was a change in npm that may be related because this is around the time I had this issue.
References: