0.61.5 → 0.62.0 RCTBridgeModule Error
See original GitHub issueI upgrade 0.61.5 → 0.62.0 version but getting below error
cannot initialize a parameter of type 'NSArray<id<RCTBridgeModule>> *' with an lvalue of type 'NSArray<Class> *__strong' NSArray<RCTModuleData *> *newModules = [self _initializeModules:modules withDispatchGroup:NULL lazilyDiscovered:YES];
React Native Info:
System:
OS: macOS 10.15.3
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 63.01 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 10.15.3 - /usr/local/bin/node
Yarn: 1.15.2 - ~/.yarn/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: Not Found
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 23, 25, 26, 27, 28, 29
Build Tools: 27.0.3, 28.0.3, 29.0.0, 29.0.1, 29.0.2
System Images: android-27 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.6010548
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
Languages:
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.62.0 => 0.62.0
npmGlobalPackages:
*react-native*: Not Found
This line:
Issue Analytics
- State:
- Created 3 years ago
- Comments:60 (2 by maintainers)
Top Results From Across the Web
Fix upgrade 0.61.5 → 0.62.0 version but getting below error ...
Fix upgrade 0.61.5 → 0.62.0 version but getting below error. This was fixed in the new rn version but if you don't want...
Read more >分类专栏 - CSDN博客
0.61.5 → 0.62.0 RCTBridgeModule Error #28405 ... Cannot initialize a parameter of type 'NSArray<id<RCTBridgeModule>> *' with an lvalue of ...
Read more >React Native / iOS SDK. No matching function for call to ...
After that I got a new error which is related to Flipper: ... *)_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules ...
Read more >我的代码我的坑(十四) —— Xcode 12.5中React编译不过的 ...
已经有人在github的react-native发过了issue - 0.61.5 → 0.62.0 RCTBridgeModule Error #28405。其实这是 rn 的一个问题,在新版本的 rn 中已经修复 ...
Read more >Upgrade to React Native 0.62 - Matt Oakes
... helper tool and the diff I will be talking you through is the one between 0.61.5 to 0.62.2. ... this might lead...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This was fixed in the new rn version but if you don’t want to upgrade
Add this post install script to your Podfile:
End of the Podfile add this function:
After adding this script, just run pod install command.
Happy Coding ❤️
Use
patch-packages
! I think writing above codes on thePodfile
is not sure. Because above solution are the code that simply replace part of codes on thenode_modules/react-native
. This is not a responsibility ofPodfile
.Here’s my solution.
yarn add -D patch-package
node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm
and replace_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules
to_initializeModules:(NSArray<Class> *)modules
node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm
and replaceRCTBridgeModuleNameForClass(module))
toRCTBridgeModuleNameForClass(Class(module)))
yarn patch-package react-native