upgrade-support icon indicating copy to clipboard operation
upgrade-support copied to clipboard

How to remove manual linking code in React Native

Open kch8293 opened this issue 2 months ago • 1 comments

Environment

System:
  OS: Windows 11 10.0.26100
  CPU: (22) x64 Intel(R) Core(TM) Ultra 7 165H
  Memory: 4.67 GB / 31.46 GB
Binaries:
  Node:
    version: 16.13.1
    path: C:\nvm4w\nodejs\node.EXE
  Yarn: Not Found
  npm:
    version: 8.1.2
    path: C:\nvm4w\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: Version     2021.1.0.0 AI-211.7628.21.2111.8193401
  Visual Studio:
    - 15.9.36128.30 (Visual Studio Professional 2017)
    - 16.11.35325.158 (Visual Studio Professional 2019)
Languages:
  Java:
    version: 17.0.16
    path: C:\Program Files\OpenLogic\jdk-17.0.16.8-hotspot\bin\javac.EXE
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.17
    wanted: ^0.72.17
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Things I’ve done to figure out my issue

  • [ /] I used upgrade-helper to do my upgrade. Removed previously existed manual linking code from "android/settings.gradle", "android/app/build.gradle" and "MainApplication.java"

Upgrading version

0.65.3 to 0.72.17

Description

Having error using newly installed node packages, unable to initialise manager object from new packages. Have zero issues when done in clean 0.72.17 version React Native project. I have checked that the node packages installed are compatible with the React Native version. So I high suspect that it is an issue with linking node packages to the project.

Reproducible demo

Project is work related, so unable to share project. Only reproducible in my existing project.

kch8293 avatar Oct 16 '25 10:10 kch8293

FAILURE: Build failed with an exception.

  • Where: Script 'D:\coppernic\node_modules@react-native-community\cli-platform-android\native_modules.gradle' line: 194

  • What went wrong: A problem occurred evaluating project ':app'.

Project with path ':react-native-community_datetimepicker' could not be found in project ':app'.

  • 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

Seems like the project is still trying to link the node packages manually

kch8293 avatar Oct 16 '25 10:10 kch8293