react-native: [0.48.0]: Error: Redefinition of RCTMethodInfo
After upgrading from 0.47.2 -> 0.48.0, I can’t get XCode to build anymore. I’ve tried clearing out derived data, cleaning the project, etc. It’s consistently failing with this error, across various react-native-* modules I have installed.

About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 44
- Comments: 39 (6 by maintainers)
Commits related to this issue
- For React-Native 0.48 https://github.com/facebook/react-native/issues/15775 — committed to Abrax20/react-native-ble-plx by Abrax20 7 years ago
- Redefinition of 'RCTMethodInfo' 升级到 react-native@0.49.5 以后,出现 https://github.com/facebook/react-native/issues/15775 这个问题,调整顺序后解决。 — committed to cpunion/react-native-netease-im by cpunion 7 years ago
- Redefinition of 'RCTMethodInfo' 升级到 react-native@0.49.5 以后,出现 https://github.com/facebook/react-native/issues/15775 这个问题,调整顺序后解决。 — committed to cpunion/react-native-netease-im by cpunion 7 years ago
- Redefinition of 'RCTMethodInfo' 升级到 react-native@0.49.5 以后,出现 https://github.com/facebook/react-native/issues/15775 这个问题,调整顺序后解决。 — committed to cpunion/react-native-netease-im by cpunion 7 years ago
- Switch RN module import fallbacks See this issue for reference: https://github.com/facebook/react-native/issues/15775#issuecomment-327082159 Seems like React doesn't like it when the fallback is t... — committed to tamagokun/react-native-event-bridge by tamagokun 7 years ago
- make compatible with rn 48.1+ this would not build in react-native 48.1+ its related to this https://github.com/facebook/react-native/issues/15775 — committed to spearmootz/react-native-pinch by spearmootz 7 years ago
- Update React Native imports to work with 0.48 See https://github.com/facebook/react-native/issues/15775 — committed to Thinkspan/react-native-dropbox-chooser by jfaris 6 years ago
- Update React Native imports to work with 0.48 (#6) See https://github.com/facebook/react-native/issues/15775 — committed to tinycreative/react-native-dropbox-chooser by jfaris 6 years ago
- Fix duplicate RCTMethodInfo import (https://github.com/facebook/react-native/issues/15775) (https://github.com/yonahforst/react-native-permissions/issues/137) — committed to thebradbain/react-native-oauth by thebradbain 6 years ago
- fix "Error: Redefinition of RCTMethodInfo" following https://github.com/facebook/react-native/issues/15775 and this PR - https://github.com/nico1510/react-native-image-crop-picker/pull/9/files it... — committed to mraucorp/react-native-image-cropping by mraucorp 6 years ago
- Change import priority of RCTBridgeModule This appears to be the accepted fix for this issue: https://github.com/master-atul/react-native-exception-handler/issues/46 per https://github.com/facebook/r... — committed to TomMahle/react-native-exception-handler by TomMahle 6 years ago
- Changed import of RCTBridgeModule This is to correspond with React Native 0.48. It no longer works with #import "RCTBridgeModule.h" (see this issue: https://github.com/facebook/react-native/issues/15... — committed to EricWiener/react-native-image-cropping by EricWiener 6 years ago
- Update ReactNativeTvosController.h — committed to XiteTV/react-native-tvos-controller by ruen89 6 years ago
- Merge fullstackreact/react-native-oauth master branch into shalin-jasani/fullstackreact/react-native-oauth master branch (#1) * Added https://github.com/fullstackreact/react-native-oauth/pull/171 an... — committed to shalin-jasani/react-native-oauth by shalin-jasani 6 years ago
as per latest document
Adding DevSupport in Podfile fixed RCTDevMenu.h not found issue. As point out by others, Changing
import "RCTBridgeModule.h"toimport <React/RCTBridgeModule.h>fixed the RCTBridgeModule not found error.Is this issue getting looked at by management upstairs? No tag or assignment, and this should be priority fix with a .2 release considering it’s build breaking.
Shouldn’t RN releases pass basic build tests before being released in the first place? 😢
I had the same issue from a Ble lib. If I change the imports from the header module from:
to:
it fix my problem.
React Native 0.48.1
Same issue here with a third party module
+1 - RCTDevMenu.h file not found
@kozillla I was right, you found that module, which conflicts with React Native. Whatever, the problem, that third-partly modules import React Native modules as
#import "RCTBridgeModule.h"first and<React/RCTBridgeModule.h>as failback. But should be otherwise.Same situation here: https://github.com/yonahforst/react-native-permissions/pull/138 P.S.: It was bad idea using
<React/namespace in 0.41.Also possible to just add
DevSupportinstead of specifying all modules from theReactpod:@kozillla I had the same issue. I dont know if its the correct way to fix the issue but here it is: change the React.podspec (node_modules/react-native) line " React/DevSupport/* " in ss.exclude_files of subspec “Core” to “React/DevSupport/*.{c,m,mm,S}”. Run pod install and should work.
To solve this issue I updated all my dependencies and link again. Then, I change all #import “RCTBridgeModule.h” to #import <React/RCTBridgeModule.h>.
Thanks for the comments everyone, I was able to get past this issue by using some code forks that the community has created the various third-party modules that are not yet compatible with RN
0.48.x. For me, it was these two:I will use these forks for now, until official fixes land on the
masterbranch for these two projects.Confirmed fix, with adding
'DevSupport'line topod 'React'in Podfile fixesRCTDevMenu.hnot found issue.This needs to be better documented, as previous to RN 0.48, build didn’t break without the
'DevSupport'line in Podfile.RCTDevMenu.h file not found is happening for me too, in RCTTVRemoteHandler.m
@grabbou please note that RN 0.48.1 seems to have fixed this issue’s original
RCTMethodInfoerror, but not error withRCTDevMenu.h. It’s persisting in 0.48.1 and is a showstopper with build failing@exentrich clean project, rebuild [CMD] + [CTRL] + [SHIFT] + [K]
Resolved, by changing import priority: https://github.com/yonahforst/react-native-permissions/issues/137