Search code examples
react-nativereact-native-gifted-chat

React Native - Module AppRegistry is not a registered callable module


I get error Module AppRegistry is not a registered callable module whenever I upgrade above react-native 0.61.5. Once I downgrade back to 0.61.5 it works fine again.

UPDATE 11/14/20 I tried the answer killall -9 node but I get the error bash: killall: command not found. This is likely a very rookie mistake where I need to install something or run command from different path

UPDATE 12/28/20 - in response to @dhruv soni.....below is my index.js file where AppRegistry.registerComponent is called:

UPDATE 01/23/21 - I used "React Native Upgrade Helper" to upgrade...triple checked everything is correct. Issue only occurs on Android (not IOS)....but it builds fine on Android Studio...error only occurs with react-native run-android. I use very many 3rd party libraries so Im guessing its related to that


Solution

  • Fixed the issue on my end by double checking that i modified all the files correctly during my RN upgrade, then running watchman watch-del-all, and react-native start --reset-cache. Then on android, build -> clean. then it worked! sigh

    Specific solution of your question

    I found a wrong initialization of appContainer. you can fix as below

    const AppContainer = createAppContainer(SignedInTabNav);
    
    class App extends React.Component {
      render() {
        return <AppContainer />;
      }
    }
    
    export default App;