Closed PreetikaSingh closed 1 year ago
Added "react-native-codegen": "^0.71.5" under devDependencies in package.json
The version of react-native-codegen needs to match the version of react-native you have installed, you should let npm handle that as a transitive dependency for you. Any reason you're explicitly adding this dependecy?
While running yarn add react-native-codegen it is automatically adding this version - 0.71.5 and this is added as a part of the new Arch as a tool for automating the compatibility between JavaScript and native code at build time, instead of at runtime.
Here is the output: => Found "react-native-codegen@0.71.5" info Has been hoisted to "react-native-codegen" info Reasons this module exists
The issue is fixed after removing Codegen and Installing again after the expo upgrade
I forked React Native repo to contribute and I get the same issue. Any Idea how it can be solved ? @PreetikaSingh @blakef
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':packages:react-native:ReactAndroid:buildCodegenCLI'.
> Process 'command 'bash'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.
BUILD FAILED in 2s
npx react-native info output
info Fetching system and libraries information...
System:
OS: Windows 10 10.0.22621
CPU: "(12) x64 AMD Ryzen 5 2600 Six-Core Processor "
Memory: 5.88 GB / 15.95 GB
Binaries:
Node:
version: 20.9.0
path: C:\Program Files\nodejs\node.EXE
Yarn:
version: 1.22.19
path: C:\Program Files\nodejs\yarn.CMD
npm:
version: 10.1.0
path: C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowAllTrustedApps: Disabled
IDEs:
Android Studio: AI-213.7172.25.2113.9123335
Visual Studio:
- 17.6.33723.286 (Visual Studio Community 2022)
Languages:
Java:
version: 19.0.1
path: /c/Program Files/Java/jdk-19.0.1/bin/javac
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native: Not Found
react-native-windows: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
@adhamhassan99 Are you able to resolve this?
Description
Im with react native 0.71.0 new Architecture but facing the issue with Codegen :
1: Task failed with an exception.
What went wrong: Execution failed for task ':react-native:ReactAndroid:buildCodegenCLI'. A problem occurred starting process 'command '.../node_modules/@react-native/codegen/scripts/oss/build.sh'' Here is my settings.gradle file
Changed newArchEnabled=true in gradle.properties
Added "react-native-codegen": "^0.71.5" under devDependencies in package.json
Here is my app/build.gradle
Not able to proceed further with the build due to the error. Any update on the same would be highly appreciated.
React Native Version
0.71.4
Output of
npx react-native info
System: OS: macOS 12.6.3 CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz Memory: 41.51 MB / 8.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.3.0 - ~/.nvm/versions/node/v16.3.0/bin/node Yarn: 1.22.19 - ~/.yarn/bin/yarn npm: 9.6.1 - ~/Documents/Projects/XXX/node_modules/.bin/npm Watchman: 2023.03.13.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.12.0 - /Users/XXX/.rbenv/shims/pod SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 Android SDK: Not Found IDEs: Android Studio: 2022.1 AI-221.6008.13.2211.9619390 Xcode: 14.2/14C18 - /usr/bin/xcodebuild Languages: Java: 19.0.2 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: ^0.71.0 => 0.71.4 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
Upgraded to new react native Architecture and version and installed codegen and got the issue.
Snack, code example, screenshot, or link to a repository
https://stackoverflow.com/questions/75788774/react-native-new-architecture-problem-with-codegen/75789282#75789282