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

Bleeding edge fails on generateCodegenArtifactsFromSchema #382

Open
djMax opened this issue Apr 28, 2023 · 11 comments
Open

Bleeding edge fails on generateCodegenArtifactsFromSchema #382

djMax opened this issue Apr 28, 2023 · 11 comments
Labels
help wanted Extra attention is needed New arch

Comments

@djMax
Copy link

djMax commented Apr 28, 2023

I am on RN 0.72 using Fabric and unable to build release mode on android with the following error:

> Task :react-native-safe-area-context:generateCodegenArtifactsFromSchema FAILED
/Users/memetral/dev/personal/rn-monorepo-fabric/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleH.js:249
  return Object.keys(aliasMap)
                ^

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at createStructsString (/Users/memetral/dev/personal/rn-monorepo-fabric/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleH.js:249:17)
    at /Users/memetral/dev/personal/rn-monorepo-fabric/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleH.js:488:23
    at Array.flatMap (<anonymous>)
    at generate (/Users/memetral/dev/personal/rn-monorepo-fabric/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleH.js:481:48)
    at Object.generate (/Users/memetral/dev/personal/rn-monorepo-fabric/node_modules/@react-native/codegen/lib/generators/RNCodegen.js:194:9)
    at Object.generateSpec [as execute] (/Users/memetral/dev/personal/rn-monorepo-fabric/node_modules/react-native/scripts/codegen/generate-specs-cli-executor.js:97:13)
    at main (/Users/memetral/dev/personal/rn-monorepo-fabric/node_modules/react-native/scripts/generate-specs-cli.js:51:12)
    at Object.<anonymous> (/Users/memetral/dev/personal/rn-monorepo-fabric/node_modules/react-native/scripts/generate-specs-cli.js:61:1)
    at Module._compile (node:internal/modules/cjs/loader:1196:14)

Bare bones project here https://github.com/djMax/rn-monorepo-fabric

@jacobp100 jacobp100 added the help wanted Extra attention is needed label Apr 28, 2023
@jacobp100
Copy link
Collaborator

0.72 is a release candidate - but it would be nice to get this fixed before it goes live

Is this something you may be able to help with?

@djMax
Copy link
Author

djMax commented Apr 28, 2023

Help fixing, not sure, because I know nothing about the codegen flow. But I am happy to try, to chase leads, and to test the heck out of it.

@djMax
Copy link
Author

djMax commented May 1, 2023

So this same error happens with react-native-community_datetimepicker, if that provides any leads

@jacobp100
Copy link
Collaborator

Is this still an issue?

@artemis-prime
Copy link

What was the resolution exactly?? @jacobp100 ? I'm getting this with 0.72.0-rc.1, which is asked for by react-native-reanimated.

@wdcs-harshitpadalia
Copy link

I am also facing this issue

@jacobp100 jacobp100 reopened this Jun 30, 2023
@jruvel
Copy link

jruvel commented Jul 21, 2023

We are seeing same issue. 0.72.3 RN and 4.7.1 react-native-safe-area-context

@jacobp100
Copy link
Collaborator

This issue has got a help wanted tag

Remember that fabric in RN is still considered experimental. I'd recommend sticking with the old arch unless you're able to fix these sort of issues and contribute the fixes back to projects

@jacobp100
Copy link
Collaborator

Is this for Android?

@DreamakerDimas
Copy link

DreamakerDimas commented Aug 21, 2023

Having the same issue.
RN: 0.72.1

Getting this error at least from these libraries:
react-native-async-storage: 1.19.2
react-native-bootsplash: 3.7.5
react-native-camera-roll: 5.3.1

I guess if I keep removing libraries from dependency I will get the same for react-native-safe-area-context as well.

Does anyone know what causes this issue? It's the only thread that I found about this error.

I also have monorepo in the project so I am wondering if it is the source

@ludal
Copy link

ludal commented Oct 13, 2023

Had same issue and solved it by adding

react {
    codegenDir = file("../../node_modules/@react-native/codegen")
}

in android/app/build.gradle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed New arch
Projects
None yet
Development

No branches or pull requests

7 participants