Rocket.chat.reactnative: What version of Node.js, Yarn, and react-native to build the app ?

Created on 13 Dec 2019  ยท  4Comments  ยท  Source: RocketChat/Rocket.Chat.ReactNative

Hello,

I get many errors when I try to build the react-native app of Rocket.Chat. These errors are mainly linked to Node.js Yarn and react-native versions.

What is the most recommended version of Node.js, Yarn, and react-native for building the latest stable release Version: 4.1.0.

Thanks.

โ“ question

Most helpful comment

Hello @HamzaKhait , I am using the following versions,
Node version >=8.x is fine, I am having 10.6.1,
React native cli 2.0.1
React native 0.61.3
Yarn v1.17.3
Hope this helps

All 4 comments

Hello @HamzaKhait , I am using the following versions,
Node version >=8.x is fine, I am having 10.6.1,
React native cli 2.0.1
React native 0.61.3
Yarn v1.17.3
Hope this helps

We don't have a recommend version, but 10.13 works fine here.

@Prateek93a @diegolmello Thanks for the feedback.
I'm sorry for reopening this issue but the problem is unsolved.
When I try to build the single-server branch, I get the following error :

> Configure project :rn-extensions-share
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.2.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Task :app:processDebugGoogleServices FAILED
Parsing json file: C:\Users\hamza.khait.i\Desktop\Rocket.Chat.ReactNative\android\app\google-services.json

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
266 actionable tasks: 2 executed, 264 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> Failed to create folder: C:\Users\hamza.khait.i\Desktop\Rocket.Chat.ReactNative\android\app\build\generated\res\google-services\debug

* 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 1m 37s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> Failed to create folder: C:\Users\hamza.khait.i\Desktop\Rocket.Chat.ReactNative\android\app\build\generated\res\google-services\debug

* 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 1m 37s

    at checkExecSyncError (child_process.js:611:11)
    at execFileSync (child_process.js:629:13)
    at runOnAllDevices (C:\Users\hamza.khait.i\Desktop\Rocket.Chat.ReactNative\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
    at buildAndRun (C:\Users\hamza.khait.i\Desktop\Rocket.Chat.ReactNative\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
    at then.result (C:\Users\hamza.khait.i\Desktop\Rocket.Chat.ReactNative\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12)
    at process._tickCallback (internal/process/next_tick.js:68:7)

@Prateek93a @diegolmello Thanks for the feedback.
I'm sorry for reopening this issue but the problem is unsolved.
When I try to build the single-server branch, I get the following error :

> Configure project :rn-extensions-share
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.2.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Task :app:processDebugGoogleServices FAILED
Parsing json file: C:\Users\hamza.khait.i\Desktop\Rocket.Chat.ReactNative\android\app\google-services.json

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
266 actionable tasks: 2 executed, 264 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> Failed to create folder: C:\Users\hamza.khait.i\Desktop\Rocket.Chat.ReactNative\android\app\build\generated\res\google-services\debug

* 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 1m 37s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> Failed to create folder: C:\Users\hamza.khait.i\Desktop\Rocket.Chat.ReactNative\android\app\build\generated\res\google-services\debug

* 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 1m 37s

    at checkExecSyncError (child_process.js:611:11)
    at execFileSync (child_process.js:629:13)
    at runOnAllDevices (C:\Users\hamza.khait.i\Desktop\Rocket.Chat.ReactNative\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
    at buildAndRun (C:\Users\hamza.khait.i\Desktop\Rocket.Chat.ReactNative\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
    at then.result (C:\Users\hamza.khait.i\Desktop\Rocket.Chat.ReactNative\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Any luck with this man?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

diegolmello picture diegolmello  ยท  5Comments

sadeghpro picture sadeghpro  ยท  5Comments

avimanyu786 picture avimanyu786  ยท  5Comments

djnews24 picture djnews24  ยท  4Comments

MatthiasHertel picture MatthiasHertel  ยท  4Comments