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

[New Architecture][Android][Windows] React Native Codegen is unable to locate the "src" folder. #453

Closed
2 tasks
alabsi91 opened this issue Aug 31, 2023 · 2 comments
Labels
bug Something isn't working needs-repro

Comments

@alabsi91
Copy link

alabsi91 commented Aug 31, 2023

Description

While building for React Native's new architecture on Windows, an issue arises where the codegen cannot locate the "src" folder. This leads to an empty path at "android\build\generated\source\codegen\java," causing the build to fail. To address this, I managed to resolve the problem by making the following changes:

// ./package.json

"codegenConfig": {
    "name": "RNMaterialYouSpec",
    "type": "modules",
-  "jsSrcsDir": "src",
+  "jsSrcsDir": "",
}

Packages

  • create-react-native-library
  • react-native-builder-bob

Selected options

I tested it by creating new empty projects for both TurboModules and Fabric (using both Java and Kotlin), and unfortunately, the build process failed for both. However, the build succeeded for Paper with the old architecture.

Link to repro

No response

Environment

Windows 11
Node.js v18.16.0
npm

@alabsi91 alabsi91 added the bug Something isn't working label Aug 31, 2023
@satya164
Copy link
Member

Can you provide a link to the project with the issue?

@alabsi91
Copy link
Author

The issue was resolved when using the latest template version. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-repro
Projects
None yet
Development

No branches or pull requests

2 participants