0

This is my app.js code

import React from 'react';
import {
  SafeAreaView,
  ScrollView,
  StatusBar,
  StyleSheet,
  Text,
  useColorScheme,
  View,
} from 'react-native';
import { createDrawerNavigator } from '@react-navigation/drawer';
import { NavigationContainer } from '@react-navigation/native';
import Home from './src/components/Home';
import Login from './src/components/Login';

const Drawer = createDrawerNavigator();
function App() {
  return(
    <NavigationContainer>
    <Drawer.Navigator>
      <Drawer.Screen name="Home" component={Home} />
      <Drawer.Screen name="Login" component={Login} />
    </Drawer.Navigator>
    </NavigationContainer>
  )
}

export default App;

This is my dependency package

"dependencies": {
    "@react-navigation/bottom-tabs": "^6.2.0",
    "@react-navigation/drawer": "^6.3.1",
    "@react-navigation/native": "^6.0.8",
    "@react-navigation/native-stack": "^6.5.1",
    "react": "17.0.2",
    "react-native": "^0.65.0",
    "react-native-gesture-handler": "^1.10.3",
    "react-native-reanimated": "^1.13.2"
  },

Error

ERROR TypeError: null is not an object (evaluating '_ReanimatedModule.default.createNode') ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native. ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

When i try to start react-native this error comes...

Please any one help me and rectify me

Siddarth
  • 49
  • 3
  • 6

2 Answers2

3

I was getting the same error. Upgrading the react-native-reanimated version to react-native-reanimated@2.2.0 solved my issue

I used npm install react-native-reanimated@2.2.0, after uninstalling the previous version

Mj.Mthimunye
  • 96
  • 1
  • 2
  • 10
  • Uninstall reanimated package and install version 2.2.0 But It shows the errorWARN If you want to use Reanimated 2 then go through our installation steps https://docs.swmansion.com/react-native-reanimated/docs/installation – Siddarth Mar 23 '22 at 12:43
  • This link can assist https://stackoverflow.com/questions/68425674/after-installin-reanimated-2-still-get-the-warrning-if-you-want-to-use-reanimat – Mj.Mthimunye Mar 23 '22 at 20:17
1

I deleted my node_modules folder then yarn install then I installed react-native-reanimated@2.2.0 and it worked like a charm.

Alex Mochu
  • 21
  • 4