Javascript 反应本机:本机prop RCTView.maxHeight没有propType

Javascript 反应本机:本机prop RCTView.maxHeight没有propType,javascript,ios,reactjs,npm,react-native,Javascript,Ios,Reactjs,Npm,React Native,升级到RN0.30后,我开始看到下面显示的错误,即使是在构建尽可能简单的代码时: 最奇怪的是,警告消息中包括了组件BlurView、VibrancyView和RNSearchBar,尽管项目没有使用它们 重新编译/清理项目并不能解决问题 控制台错误(&R): 2016-07-22 08:48:02.985 [warn][tid:main][RCTEventEmitter.m:52] Sending `websocketFailed` with no listeners registered.

升级到RN0.30后,我开始看到下面显示的错误,即使是在构建尽可能简单的代码时:

  • 最奇怪的是,警告消息中包括了组件
    BlurView
    VibrancyView
    RNSearchBar
    ,尽管项目没有使用它们
  • 重新编译/清理项目并不能解决问题
控制台错误(&R):

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.

此错误的原因是,在我更新到
0.30
后,React packager的另一个实例(仍在
0.28
上)正在后台运行


重新启动React packager解决了该问题

我通过react native start重新启动了react native,它解决了我的问题。

在我的情况下,react服务器和react项目不匹配。我用错误的节点服务器运行了错误的项目。

我收到了相同的错误消息,尽管在我的例子中,它是由依赖项之间的不兼容引起的

我解决这个问题的方法是:

  • 使用
    Create react native app foo
    创建新项目。这应该安装兼容的依赖项
  • 打开项目的
    package.json
    并更新依赖项的版本,以匹配foo的
    package.json
    中的版本
  • 检查expo版本是否与文件
    app.json
    中的
    sdkVersion
    匹配,必要时进行更新
  • 删除
    node\u模块
    并重新安装所有软件包

  • 我希望有帮助

    以上这些对我来说都不起作用,但是
    Thread cache clean
    成功了。

    这表明你的js和本机代码不同步。你试过“react native upgrade”吗?试过没有帮助,我的所有软件包都是最新的,我正在使用react native v
    0.30
    因为打包机可以在后台进程中运行,所以不要忘记检查
    lsof-n-i4TCP:8081
    。如何“重新启动React-packager”?@Negin Basiri在OSX上通常会打开一个单独的终端窗口,只需关闭该窗口,然后再次运行xcode项目。在我的情况下,是包装商进入了另一个项目。谢谢你的提示!哇,这真是糟糕透了。这是唯一对我有效的解决方案。。。我不知道如果不是这样我怎么会找到这个。非常感谢。或者,
    react native start--reset cache
    npm start--reset cache
    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.