react-native-safe-area-context
react-native-safe-area-context copied to clipboard
Bleeding edge fails on generateCodegenArtifactsFromSchema
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
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?
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.
So this same error happens with react-native-community_datetimepicker, if that provides any leads
Is this still an issue?
What was the resolution exactly?? @jacobp100 ? I'm getting this with 0.72.0-rc.1, which is asked for by react-native-reanimated.
I am also facing this issue
We are seeing same issue. 0.72.3 RN and 4.7.1 react-native-safe-area-context
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
Is this for Android?
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
Had same issue and solved it by adding
react {
codegenDir = file("../../node_modules/@react-native/codegen")
}
in android/app/build.gradle