question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?

See original GitHub issue

There are warnings on app start:

2018-03-05 21:10:33.505 [warn][tid:main][RCTBridge.m:120] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2018-03-05 21:10:33.505169+0700 AwesomeProject[23617:4551316] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?

Environment

Environment:
  OS: macOS High Sierra 10.13.3
  Node: 9.7.1
  Yarn: 1.5.1
  npm: 5.6.0
  Watchman: 4.9.0
  Xcode: Xcode 9.2 Build version 9C40b
  Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
  react: ^16.3.0-alpha.1 => 16.3.0-alpha.1
  react-native: 0.54.0 => 0.54.0

Expected Behavior

No warnings.

Actual Behavior

There are warnings.

Steps to Reproduce

  1. react-native init AwesomeProject
  2. Open ios/AwesomeProject.xcodeproj
  3. Run the app and look at the output.
  4. There will be warnings among first several lines.

I’ve tested several versions back (0.49) and the issue is there as well.

Sample project

https://github.com/vshab/react-native-0.54-run-warning

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:44
  • Comments:28 (1 by maintainers)

github_iconTop GitHub Comments

26reactions
codemerscommented, May 19, 2018

@frayhan32 For now it’s not the best solution, but to avoid the warning we can ignore it:

import { YellowBox } from 'react-native'; YellowBox.ignoreWarnings(['Class RCTCxxModule']);

22reactions
jmeyers91commented, Apr 20, 2018

Also seeing this with react-native 0.55.3.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-native: Class RCTCxxModule was not exported. Did ...
I kept getting the error Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE? . I've walked my environment all the ......
Read more >
iOS Native Modules
The RCTConvert helper functions all accept a JSON value as input and map it to a native Objective-C type or class. Exporting Constants​....
Read more >
Troubleshooting common React Native bugs - LogRocket Blog
This troubleshooting guide shares how to easily find and address common React Native bugs. See common error examples.
Read more >
How to Bridge an Objective-C View Component - Code Daily
The Manager is also where we setup the module bridge, and declare what sort of ... we call RCT_EXPORT_MODULE() that tells React we...
Read more >
iOS custom native module - React Made Native Easy
Let's build the same native module for iOS that we built for Android in the ... Here we are exporting a method getDeviceName()...
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