facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
117.15k stars 24.08k forks source link

React Native Monorepo - Failed to notify project evaluation listener. > /Users/48126/Documents/coding/moduleFed/packages/node_modules/react-native/ReactAndroid/gradle.properties (No such file or directory) #42692

Open DivyatejaChe opened 5 months ago

DivyatejaChe commented 5 months ago

Description

I have a monorepo of two RN Apps (miniAppXXX - both running on RN 0.73.2) and two shared JS modules (appXX - just exports a console.log statement) whose structure looks like this -

Screenshot 2024-01-27 at 21 15 33

Root-level package.json looks like this -

Screenshot 2024-01-27 at 21 17 21

When I try running the first app on Android, it throws me the following error - image

This is how my build.gradle looks like (android/app) for the miniAppOne - image

Steps to reproduce

  1. Clone the repo here - https://github.com/DivyatejaChe/moduleFederation
  2. npm i in the root directory
  3. Try running npm run start-miniAppOne && run-android-miniAppOne

React Native Version

0.73.2

Affected Platforms

Runtime - Android

Output of npx react-native info

System:
  OS: macOS 13.6
  CPU: (10) arm64 Apple M1 Max
  Memory: 132.64 MB / 32.00 GB
  Shell:
    version: 3.2.57
    path: /bin/bash
Binaries:
  Node:
    version: 20.6.1
    path: /opt/homebrew/bin/node
  Yarn:
    version: 1.22.19
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.2.5
    path: /opt/homebrew/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.14.3
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2021.3 AI-213.7172.25.2113.9014738
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.4.1
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

npm ERR! Lifecycle script `android` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: miniAppOne@0.0.1 
npm ERR!   at location: /Users/48126/Documents/coding/moduleFed/packages/miniAppOne

Reproducer

https://github.com/DivyatejaChe/moduleFederation

Screenshots and Videos

No response

cortinico commented 5 months ago

Hi @DivyatejaChe Could you open the same issue here:

https://github.com/react-native-community/cli/issues ?