Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module @react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js #43508

Closed
bartoszhernas opened this issue Mar 15, 2024 · 4 comments
Labels
Newer Patch Available Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@bartoszhernas
Copy link

bartoszhernas commented Mar 15, 2024

Description

After enabling fabric, and getting to the point where iOS builds and runs, I am having problem with Android. Doesn't build with this error, similar to #34248

Any idea what may be wrong?

Steps to reproduce

Enable fabric for Android

React Native Version

0.73.6

Affected Platforms

Runtime - Android

Areas

Fabric - The New Renderer

Output of npx react-native info

pnpm react-native info
info Fetching system and libraries information...
System:
  OS: macOS 14.3.1
  CPU: (16) arm64 Apple M3 Max
  Memory: 250.78 MB / 64.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.10.0
    path: ~/.nvm/versions/node/v20.10.0/bin/node
  Yarn:
    version: 1.22.19
    path: ~/.yarn/bin/yarn
  npm:
    version: 10.2.3
    path: ~/.nvm/versions/node/v20.10.0/bin/npm
  Watchman:
    version: 2024.01.22.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods: Not Found
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK:
    API Levels:
      - "28"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
      - "34"
    Build Tools:
      - 28.0.3
      - 29.0.2
      - 29.0.3
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 31.0.0
      - 32.0.0
      - 33.0.1
      - 34.0.0
    System Images:
      - android-30 | Google APIs ARM 64 v8a
      - android-31 | Google Play ARM 64 v8a
    Android NDK: 23.0.7196353-beta2
IDEs:
  Android Studio: Not Found
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /Users/bartoszhernas/.sdkman/candidates/java/17.0.10-jbr/bin/javac
  Ruby:
    version: 3.2.2
    path: /Users/bartoszhernas/.rvm/rubies/ruby-3.2.2/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.6
    wanted: 0.73.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

error Failed to install the app. Command failed with exit code 1: ./gradlew app:installFymRcGoogleDebug -PreactNativeDevServerPort=8081
node:internal/modules/cjs/loader:1147 throw err; ^ Error: Cannot find module '/Users/bartoszhernas/Developer/FYM/app/renderer/node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15) at Module._load (node:internal/modules/cjs/loader:985:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) at node:internal/main/run_main_module:28:49 { code: 'MODULE_NOT_FOUND', requireStack: []
} Node.js v20.10.0 FAILURE: Build failed with an exception. * What went wrong:
Execution failed for task ':react-native-clipboard_clipboard:generateCodegenSchemaFromJavaScript'.

Reproducer

https://github.com/facebook/react-native/

Screenshots and Videos

No response

@bartoszhernas bartoszhernas added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels Mar 15, 2024
@github-actions github-actions bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available labels Mar 15, 2024
Copy link

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

Copy link

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - 0.73.6. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@bartoszhernas
Copy link
Author

I have switched temporarily from pnpm to yarn and it seems that it worked. Any idea how I could make pnpm work?

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Mar 15, 2024
@bartoszhernas bartoszhernas changed the title Cannot find module react-native-codegen/lib/cli/combine/combine-js-to-schema-cli.js Cannot find module @react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js Mar 15, 2024
@bartoszhernas
Copy link
Author

Installing @react-native/codegen manually fixes the issue.

@cortinico cortinico removed Needs: Triage 🔍 Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Needs: Attention Issues where the author has responded to feedback. labels Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Newer Patch Available Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests

2 participants