"Unhandled JS Exception: t is not a function. (In 't(c)', 't' is false)" 在生产包 React Native 上

"Unhandled JS Exception: t is not a function. (In 't(c)', 't' is false)" on Production bundle React Native

React Native 版本:0.58.3

构建发布包时,在两个平台上,应用程序在启动时崩溃或在 iOS 上卡在黑屏上。

但在 Dev 模式下一切运行顺利。

日志:

2019-09-18 14:43:52.964246+0200 APP_NAME[18561:1491677]  - <AppMeasurement>[I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
2019-09-18 14:43:53.052680+0200 APP_NAME[18561:1491677] 5.17.0 - [Firebase/Analytics][I-ACS023007] Analytics v.50600000 started
2019-09-18 14:43:53.055493+0200 APP_NAME[18561:1491677] 5.17.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled
2019-09-18 14:43:53.060321+0200 APP_NAME[18561:1491697] 5.17.0 - [Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the instructions at:
https://firebase.google.com/docs/cloud-messaging/ios/client#method_swizzling_in_firebase_messaging
to ensure proper integration.
2019-09-18 14:43:53.118524+0200 APP_NAME[18561:1491639] [MediaRemote] [AVOutputContext] WARNING: AVF context unavailable for +[MRAVOutputContext sharedAudioPresentationContext]_block_invoke
2019-09-18 14:43:53.118777+0200 APP_NAME[18561:1491639] [MediaRemote] [AVOutputContext] WARNING: AVF context unavailable for SYSTEM
2019-09-18 14:43:53.133669+0200 APP_NAME[18561:1491639] NfcManager created
2019-09-18 14:43:53.255271+0200 APP_NAME[18561:1491678] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x7fb876600d20] get output frames failed, state 8196
2019-09-18 14:43:53.256357+0200 APP_NAME[18561:1491678] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x7fb876600d20] get output frames failed, state 8196
2019-09-18 14:43:53.256949+0200 APP_NAME[18561:1491678] TIC Read Status [1:0x0]: 1:57
2019-09-18 14:43:53.257744+0200 APP_NAME[18561:1491678] TIC Read Status [1:0x0]: 1:57
2019-09-18 14:43:53.270 [error][tid:com.facebook.react.JavaScript] t is not a function. (In 't(c)', 't' is false)
2019-09-18 14:43:53.271102+0200 APP_NAME[18561:1491706] t is not a function. (In 't(c)', 't' is false)
2019-09-18 14:43:53.273 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: t is not a function. (In 't(c)', 't' is false)
2019-09-18 14:43:53.272959+0200 APP_NAME[18561:1491679] Unhandled JS Exception: t is not a function. (In 't(c)', 't' is false)
2019-09-18 14:43:53.273 [error][tid:com.facebook.react.JavaScript] Module AppRegistry is not a registered callable module (calling runApplication)
2019-09-18 14:43:53.273202+0200 APP_NAME[18561:1491706] Module AppRegistry is not a registered callable module (calling runApplication)
2019-09-18 14:43:53.285672+0200 APP_NAME[18561:1491679] *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: t is not a function. (In 't(c)', 't' is false)', reason: 'Unhandled JS Exception: t is not a function. (In 't(c)', 't' is false), stack:

我认为它与 __DEV__ 常量有关,因为我在整个代码中使用它来决定环境和所有

所以我发现这是与 redux 相关的,并且 applyMiddleware 函数中有一个空值

https://github.com/LogRocket/redux-logger#log-only-in-development