Unhandled JS Exception: getPropertyAsObject: property '__fbRequireBatchedBridge'

╄→尐↘猪︶ㄣ 提交于 2019-12-06 01:57:36

问题


I've been having errors after errors to the point where I've reset my Metro Bundle and performed updates, errors from required module "699" to "700" have been coming up and now this. I believe I have all the required dependencies for Drawer navigator and ionicicons but errors continue to persist. I have code written in different files but below is the one written in App.js. Feel free to ask for the other ones in order to solve the issue at hand.

import React from 'react';
import {
  View,
  Text,
  StyleSheet

} from "react-native" ;

import  DrawerNavigator  from './Menu/DrawerNavigator';
import SettingScreen from './Menu/SettingScreen'

export default class App extends React.Component {

  render(){

    return (
<View style ={style.container}>
  <SettingScreen/>
  </View>


    );
  }
}


style = StyleSheet.create ({

  container: {
    flex: 1,
    justifyContent: 'center',


  },
});

回答1:


For mac,

I have this error, I believe that you have npm install/yarn add a new package and you will require to Ctrl+C to exit the Metro Bundler and restart again. The error/issue will be solved.




回答2:


For Windows,

I got the same error, what I did is

  1. close your local-cli windows(picture attached)
  2. uninstall the app from your device/emulator(there can be two apps with the slight change name of theirs).
  3. run again the with react native command like 'react-native run-android'
  4. I tried to reproduce it after these steps but I wasn't able




回答3:


For Windows 10: Restarting the Metro Bundler by pressing ctrl + c and then expo start will fix this issue.



来源:https://stackoverflow.com/questions/54659980/unhandled-js-exception-getpropertyasobject-property-fbrequirebatchedbridge

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!