Build failed on RN version 0.69.1

See original GitHub issue
node_modules/react-native-codegen/lib/parsers/typescript/index.js:191
        throw parsingErrors[0];
        ^

UnusedModuleTypeScriptInterfaceParserError: Module NativeSafeAreaContext.d: Unused NativeModule spec. Please load the NativeModule by calling TurboModuleRegistry.get<Spec>('<moduleName>').

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
SudarshJaincommented, Jul 28, 2022

does anyone solved it?? am getting the same

4reactions
antoncojocarucommented, Jul 15, 2022

If you start a new project with 0.69 you don’t need to do thats changes in your project. To enable new architecture on android you can, set the newArchEnabled property to true by either:

  • Changing the corresponding line inside the android/gradle.properties file.
  • Set an environment variable ORG_GRADLE_PROJECT_newArchEnabled=true
  • Invoke Gradle with -PnewArchEnabled=true

And nothing more.

If you, like us 😃, make changes from Prerequisites for Applications from official documentation for new 0.69 project, or you upgrade to 0.69 from previous versions (with new acrhitecture enabled) you need to remove from <your-project-dir>/android/app/build.gradle this lines:

apply plugin: "com.facebook.react"

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

And this: implementation project(":ReactAndroid")

replace with:

implementation "com.facebook.react:react-native:+"

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to build in react native 0.69.1 · Issue #1134
I cannot build on this version with IOS. I am getting the following error in xCode: `'react/bridging/CallbackWrapper.h' file not found. Same ...
Read more >
React native iOS 0.69.1 build failed when creating new ...
I hoped that by making a new project I won't run into errors but jesus. My config: iOS Catalina - version 10.15.7 XCode...
Read more >
Troubleshooting · React Native
This error indicates that the codegen script that is injected into the Xcode build pipeline has exited early. You may get this for...
Read more >
[Solved]-React native iOS 0.69.1 build failed when creating ...
Coding example for the question React native iOS 0.69.1 build failed when creating ... Looks like the pods from RN/FB are targeting deployment...
Read more >
"React Native version mismatch" errors
If this is a bare workflow project, and this error is occurring right after upgrading your React Native version, you should double-check that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found