【发布时间】:2016-11-25 23:27:03
【问题描述】:
升级到 RN 0.30 后,即使在构建最简单的app 时,我也开始看到如下所示的错误:
react-native init AwesomeProject
react-native run-ios
- 最奇怪的是组件
BlurView、VibrancyView和RNSearchBar包含在警告消息中,尽管项目没有使用它们。 - 重新编译/清理项目并不能解决问题。
控制台和错误:
2016-07-22 08:48:02.985 [warn][tid:main][RCTEventEmitter.m:52] Sending `websocketFailed` with no listeners registered.
2016-07-22 08:48:03.031 [warn][tid:com.facebook.react.JavaScript] Warning: Native component for "BlurView" does not exist
2016-07-22 08:48:03.032 [warn][tid:com.facebook.react.JavaScript] Warning: Native component for "VibrancyView" does not exist
2016-07-22 08:48:03.033 [warn][tid:com.facebook.react.JavaScript] Warning: Native component for "RNSearchBar" does not exist
2016-07-22 08:48:03.040 [error][tid:com.facebook.react.JavaScript] `Constructor` has no propType for native prop `RCTView.maxHeight` of native type `CGFloat`
If you haven't changed this prop yourself, this usually means that your versions of the native code and JavaScript code are out of sync. Updating both should make this error go away.
2016-07-22 08:48:03.043 [fatal][tid:com.facebook.react.RCTExceptionsManagerQueue] Unhandled JS Exception: `Constructor` has no propType for native prop `RCTView.maxHeight` of native type `CGFloat`
If you haven't changed this prop yourself, this usually means that your versions of the native code and JavaScript code are out of sync. Updating both should make this error go away.
2016-07-22 08:48:03.102 [error][tid:com.facebook.react.JavaScript] Module AppRegistry is not a registered callable module.
2016-07-22 08:48:03.104 [fatal][tid:com.facebook.react.RCTExceptionsManagerQueue] Unhandled JS Exception: Module AppRegistry is not a registered callable module.
【问题讨论】:
-
提示你的js和native代码不同步。你试过“react-native upgrade”吗?
-
尝试这个没有帮助,我所有的包都是最新的,我正在使用 React Native v.
0.30
标签: javascript ios reactjs npm react-native