Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication().

Please provide the following:

  1. SDK Version: 47.0
  2. Platforms(Android/iOS/web/all): iOS
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

After upgrading to the SDK 47, i got this error when starting my project.
This error can be stopped by git reset, so i think i’s a problem about the Expo SDK.

After i ran expo upgrade command, the package.json and the yarn.lock files changed:

Before upgrade, my package.json:

{
  "scripts": {
    "start": "npx expo start",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@gorhom/bottom-sheet": "^4.4.5",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/datetimepicker": "6.2.0",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-segmented-control/segmented-control": "2.4.0",
    "@react-native-seoul/masonry-list": "^1.3.2",
    "@react-navigation/bottom-tabs": "^6.3.3",
    "@react-navigation/drawer": "^6.4.4",
    "@react-navigation/elements": "^1.3.5",
    "@react-navigation/material-top-tabs": "^6.2.3",
    "@react-navigation/native": "^6.0.12",
    "@react-navigation/stack": "^6.2.3",
    "@shopify/flash-list": "1.1.0",
    "@twotalltotems/react-native-otp-input": "^1.3.11",
    "axios": "^0.27.2",
    "crypto-js": "^4.1.1",
    "dayjs": "^1.11.5",
    "expo": "~46.0.9",
    "expo-app-loading": "~2.1.0",
    "expo-apple-authentication": "~4.3.0",
    "expo-av": "~12.0.4",
    "expo-barcode-scanner": "~11.4.0",
    "expo-blur": "~11.2.0",
    "expo-camera": "~12.3.0",
    "expo-clipboard": "~3.1.0",
    "expo-dev-client": "~1.3.1",
    "expo-device": "~4.3.0",
    "expo-font": "~10.2.0",
    "expo-image-picker": "~13.3.1",
    "expo-linear-gradient": "~11.4.0",
    "expo-linking": "~3.2.2",
    "expo-splash-screen": "~0.16.2",
    "expo-status-bar": "~1.4.0",
    "expo-updates": "~0.14.6",
    "i18next": "^20.6.1",
    "native-base": "^3.4.13",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "react-i18next": "^11.11.4",
    "react-native": "0.69.6",
    "react-native-collapsible-tab-view": "^4.5.2",
    "react-native-gesture-handler": "~2.5.0",
    "react-native-gifted-chat": "^1.0.4",
    "react-native-image-viewing": "^0.2.2",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-maps": "0.31.1",
    "react-native-modal-datetime-picker": "^10.2.0",
    "react-native-modalize": "^2.1.1",
    "react-native-network-logger": "^1.13.0",
    "react-native-pager-view": "5.4.24",
    "react-native-paper": "^4.9.2",
    "react-native-reanimated": "~2.9.1",
    "react-native-reanimated-carousel": "^3.0.4",
    "react-native-render-html": "^6.3.4",
    "react-native-safe-area-context": "4.3.1",
    "react-native-screens": "~3.15.0",
    "react-native-shared-element": "0.8.4",
    "react-native-svg": "12.3.0",
    "react-native-swiper": "^1.6.0",
    "react-native-tab-view": "^3.1.1",
    "react-native-web": "~0.18.7",
    "react-native-webview": "11.23.0",
    "react-navigation-shared-element": "^3.1.3",
    "styled-components": "^5.3.5",
    "styled-system": "^5.1.5"
  },
  "devDependencies": {
    "@babel/core": "^7.18.6",
    "@expo/webpack-config": "^0.17.0",
    "@types/react": "~18.0.0",
    "@types/react-dom": "~18.0.0",
    "@types/react-native": "~0.69.1",
    "detox": "^19.11.0",
    "jest": "^26.6.3",
    "prettier": "^2.3.2",
    "typescript": "^4.6.3"
  },
  "resolutions": {
    "@types/react": "~17.0.47",
    "react-native-safe-area-context": "4.3.1"
  },
  "prettier": {
    "jsxSingleQuote": true,
    "singleQuote": true
  },
  "private": true,
  "name": "",
  "version": "1.0.0"
}

After upgrade, my package.json:

{
  "scripts": {
    "start": "npx expo start",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@gorhom/bottom-sheet": "^4.4.5",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/datetimepicker": "6.5.2",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-segmented-control/segmented-control": "2.4.0",
    "@react-native-seoul/masonry-list": "^1.3.2",
    "@react-navigation/bottom-tabs": "^6.3.3",
    "@react-navigation/drawer": "^6.4.4",
    "@react-navigation/elements": "^1.3.5",
    "@react-navigation/material-top-tabs": "^6.2.3",
    "@react-navigation/native": "^6.0.12",
    "@react-navigation/stack": "^6.2.3",
    "@shopify/flash-list": "1.3.1",
    "@twotalltotems/react-native-otp-input": "^1.3.11",
    "axios": "^0.27.2",
    "crypto-js": "^4.1.1",
    "dayjs": "^1.11.5",
    "expo": "^47.0.0",
    "expo-app-loading": "~2.1.1",
    "expo-apple-authentication": "~5.0.1",
    "expo-av": "~13.0.2",
    "expo-barcode-scanner": "~12.1.0",
    "expo-blur": "~12.0.1",
    "expo-camera": "~13.1.0",
    "expo-clipboard": "~4.0.1",
    "expo-dev-client": "~2.0.1",
    "expo-device": "~5.0.0",
    "expo-font": "~11.0.1",
    "expo-image-picker": "~14.0.2",
    "expo-linear-gradient": "~12.0.1",
    "expo-linking": "~3.3.0",
    "expo-splash-screen": "~0.17.5",
    "expo-status-bar": "~1.4.2",
    "expo-updates": "~0.15.6",
    "i18next": "^20.6.1",
    "native-base": "^3.4.13",
    "react": "18.1.0",
    "react-dom": "18.1.0",
    "react-i18next": "^11.11.4",
    "react-native": "0.70.5",
    "react-native-collapsible-tab-view": "^4.5.2",
    "react-native-gesture-handler": "~2.8.0",
    "react-native-gifted-chat": "^1.0.4",
    "react-native-image-viewing": "^0.2.2",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-maps": "1.3.2",
    "react-native-modal-datetime-picker": "^10.2.0",
    "react-native-modalize": "^2.1.1",
    "react-native-network-logger": "^1.13.0",
    "react-native-pager-view": "6.0.1",
    "react-native-paper": "^4.9.2",
    "react-native-reanimated": "~2.12.0",
    "react-native-reanimated-carousel": "^3.0.4",
    "react-native-render-html": "^6.3.4",
    "react-native-safe-area-context": "4.4.1",
    "react-native-screens": "~3.18.0",
    "react-native-shared-element": "0.8.4",
    "react-native-svg": "13.4.0",
    "react-native-swiper": "^1.6.0",
    "react-native-tab-view": "^3.1.1",
    "react-native-web": "~0.18.7",
    "react-native-webview": "11.23.1",
    "react-navigation-shared-element": "^3.1.3",
    "styled-components": "^5.3.5",
    "styled-system": "^5.1.5"
  },
  "devDependencies": {
    "@babel/core": "^7.19.3",
    "@expo/webpack-config": "^0.17.2",
    "@types/react": "~18.0.24",
    "@types/react-dom": "~18.0.8",
    "@types/react-native": "~0.70.6",
    "detox": "^19.11.0",
    "jest": "^26.6.3",
    "prettier": "^2.3.2",
    "typescript": "^4.6.3"
  },
  "resolutions": {
    "@types/react": "~17.0.47",
    "react-native-safe-area-context": "4.3.1"
  },
  "prettier": {
    "jsxSingleQuote": true,
    "singleQuote": true
  },
  "private": true,
  "name": "",
  "version": "1.0.0"
}

This problem seems can be solved temporarily:

  • git reset
  • expo upgrade --npm

After this, my project can be launched. But if i run yarn, the errors still happen.

So how can i switch back to yarn?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.