2

I have started getting this error Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication) since yesterday, my application was working and all of sudden it broke.

Google for hours most of them asked to - Delete your yarn.lock/package-json.lock file and run yarn/npm install. Then try clearing cache with npx react-native start --reset-cache but none of iit worked.

Tried deleting re-building the app but it fails with the same error.

My - index.js

/**

  • @format */
import App from './App';
import {name as appName} from './app.json';

AppRegistry.registerComponent(appName, () => App);

react Native version

"react": "16.13.1",
"react-native": "0.63.2",

Dependencies all i have are

package.json

"dependencies": {
    "@ptomasroos/react-native-multi-slider": "^2.2.2",
    "@react-native-community/datetimepicker": "^2.6.0",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-native-community/picker": "^1.6.5",
    "@react-native-community/slider": "^3.0.3",
    "@react-navigation/bottom-tabs": "^5.7.2",
    "@react-navigation/material-top-tabs": "^5.2.14",
    "@react-navigation/native": "^5.7.2",
    "@react-navigation/stack": "^5.8.0",
    "@types/react-native-svg-charts": "^5.0.3",
    "@types/react-redux": "^7.1.9",
    "lottie-ios": "3.1.8",
    "lottie-react-native": "^3.5.0",
    "moment": "^2.27.0",
    "react": "16.13.1",
    "react-moment": "^0.9.7",
    "react-native": "0.63.2",
    "react-native-gesture-handler": "^1.7.0",
    "react-native-reanimated": "^1.10.1",
    "react-native-safe-area-context": "^3.1.1",
    "react-native-screens": "^2.9.0",
    "react-native-svg": "^12.1.0",
    "react-native-svg-charts": "^5.4.0",
    "react-native-swipe-list-view": "^3.2.3",
    "react-native-swiper": "^1.6.0",
    "react-native-tab-view": "^2.15.0",
    "react-redux": "^7.2.1",
    "redux": "^4.0.5"
  }

Satish Raizada
  • 91
  • 1
  • 3
  • 6

5 Answers5

1

Step1: run command killall -9 node

Step2: run command npm start

Step3: run command react-native run-ios OR react-native run-android

1

what solved it for me was running npx react-native run-android or run-ios depends what emulator you are using.

user00001
  • 71
  • 8
1

It happened to me, when i was using:

   import { createStackNavigator } from 'react-navigation-stack'

The problem was solved by replacing it with:

  import { createStackNavigator } from "@react-navigation/stack";
H S W
  • 6,310
  • 4
  • 25
  • 36
1

Here is a solution

Step 1: npx react-native run-android

Step 2: npx react-native start

mmmmmm
  • 32,227
  • 27
  • 88
  • 117
0

I also got the same error when I tried using NativeWind for tailwindCSS in expo and running npm start --reset-cache worked for me.