Expo SDK 41 Invariant Violation: “main” has not been registered

Hello i got this error updating expo 38 to 41

SDK Version: 41
Platforms(Android/iOS/web/all):

TypeError: Super expression must either be null or a function
at node_modules\react-native\Libraries\LogBox\LogBox.js:148:8 in registerError
at node_modules\react-native\Libraries\LogBox\LogBox.js:59:8 in errorImpl
at node_modules\react-native\Libraries\LogBox\LogBox.js:33:4 in console.error
at node_modules\expo\build\environment\react-native-logs.fx.js:27:4 in error
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:104:6 in reportException
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:171:19 in handleException
at node_modules\react-native\Libraries\Core\setUpErrorHandling.js:24:6 in handleError
at node_modules\expo-error-recovery\build\ErrorRecovery.fx.js:12:21 in ErrorUtils.setGlobalHandler$argument_0
at node_modules\regenerator-runtime\runtime.js:63:36 in tryCatch
at node_modules\regenerator-runtime\runtime.js:293:29 in invoke
at node_modules\regenerator-runtime\runtime.js:63:36 in tryCatch
at node_modules\regenerator-runtime\runtime.js:154:27 in invoke
at node_modules\regenerator-runtime\runtime.js:164:18 in PromiseImpl.resolve.then$argument_0
at node_modules\react-native\node_modules\promise\setimmediate\core.js:37:13 in tryCallOne
at node_modules\react-native\node_modules\promise\setimmediate\core.js:123:24 in setImmediate$argument_0
at node_modules\react-native\Libraries\Core\Timers\JSTimers.js:130:14 in _callTimer
at node_modules\react-native\Libraries\Core\Timers\JSTimers.js:181:14 in _callImmediatesPass
at node_modules\react-native\Libraries\Core\Timers\JSTimers.js:441:30 in callImmediates
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:387:6 in __callImmediates
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:135:6 in __guard$argument_0
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:364:10 in __guard
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:134:4 in flushedQueue
at [native code]:null in flushedQueue
at [native code]:null in invokeCallbackAndReturnFlushedQueue

Invariant Violation: “main” has not been registered. This can happen if:

  • Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
  • A module failed to load due to an error and AppRegistry.registerComponent wasn’t called.
    at node_modules\react-native\Libraries\LogBox\LogBox.js:148:8 in registerError
    at node_modules\react-native\Libraries\LogBox\LogBox.js:59:8 in errorImpl
    at node_modules\react-native\Libraries\LogBox\LogBox.js:33:4 in console.error
    at node_modules\expo\build\environment\react-native-logs.fx.js:27:4 in error
    at node_modules\react-native\Libraries\Core\ExceptionsManager.js:104:6 in reportException
    at node_modules\react-native\Libraries\Core\ExceptionsManager.js:171:19 in handleException
    at node_modules\react-native\Libraries\Core\setUpErrorHandling.js:24:6 in handleError
    at node_modules\expo-error-recovery\build\ErrorRecovery.fx.js:12:21 in ErrorUtils.setGlobalHandler$argument_0
    at node_modules\regenerator-runtime\runtime.js:63:36 in tryCatch
    at node_modules\regenerator-runtime\runtime.js:293:29 in invoke
    at node_modules\regenerator-runtime\runtime.js:63:36 in tryCatch
    at node_modules\regenerator-runtime\runtime.js:154:27 in invoke
    at node_modules\regenerator-runtime\runtime.js:164:18 in PromiseImpl.resolve.then$argument_0
    at node_modules\react-native\node_modules\promise\setimmediate\core.js:37:13 in tryCallOne
    at node_modules\react-native\node_modules\promise\setimmediate\core.js:123:24 in setImmediate$argument_0
    at node_modules\react-native\Libraries\Core\Timers\JSTimers.js:130:14 in _callTimer
    at node_modules\react-native\Libraries\Core\Timers\JSTimers.js:181:14 in _callImmediatesPass
    at node_modules\react-native\Libraries\Core\Timers\JSTimers.js:441:30 in callImmediates
    at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:387:6 in __callImmediates
    at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:135:6 in __guard$argument_0
    at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:364:10 in __guard
    at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:134:4 in flushedQueue
    at [native code]:null in flushedQueue
    at [native code]:null in invokeCallbackAndReturnFlushedQueue


Package Json

{
  "name": "uniexpoapp",
  "version": "11.4.0",
  "description": "React Native Expo App!",
  "author": "daniel@mobidonia.com",
  "private": true,
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start --no-dev --minify",
    "android": "expo start --no-dev --minify --android",
    "ios": "expo start --no-dev --minify --ios",
    "eject": "expo eject",
    "test": "node ./node_modules/.bin/jest --watchAll",
    "produce": "node ./Producer/produce.js",
    "server": "node ./Producer/produce.js  --server",
    "pmserver": "pm2 start ./Producer/produce.js  -- --server",
    "zipit": "node ./Producer/zipper.js",
    "gitpush": "git push https://github.com/dimovdaniel/uniexpo.git"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    
    "@expo/react-native-action-sheet": "3.4.1",
    "@expo/vector-icons": "^12.0.0",
    "@react-native-community/masked-view": "0.1.10",
    "@react-native-community/netinfo": "6.0.0",
    "apisauce": "1.1.1",
    "base-64": "0.1.0",
    "currency-formatter": "1.5.5",
    "expo": "^41.0.0",
    "expo-ads-admob": "~10.0.4",
    "expo-av": "~9.1.2",
    "expo-barcode-scanner": "~10.1.2",
    "expo-file-system": "~11.0.2",
    "expo-font": "~9.1.0",
    "expo-google-app-auth": "8.0.1",
    "expo-image-picker": "~10.1.4",
    "expo-linear-gradient": "~9.1.0",
    "expo-localization": "~10.1.0",
    "expo-location": "~12.0.4",
    "expo-media-library": "~12.0.2",
    "expo-permissions": "~12.0.1",
    "firebase": "8.2.3",
    "galio-framework": "^0.6.3",
    "geofirestore": "3.4.1",
    "i18n-js": "3.5.1",
    "md5": "^2.2.1",
    "moment": "2.24.0",
    "react": "16.13.1",
    "react-native": "0.63.4",
    "react-native-app-intro-slider": "3.0.0",
    "react-native-elements": "1.2.7",
    "react-native-fade-in-image": "1.5.0",
    "react-native-gallery": "0.0.17",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-gifted-chat": "0.9.11",
    "react-native-image-gallery": "2.1.5",
    "react-native-maps": "0.27.1",
    "react-native-modal": "11.5.3",
    "react-native-modal-dropdown": "0.6.2",
    "react-native-ratings": "6.0.0",
    "react-native-reanimated": "~2.1.0",
    "react-native-render-html": "4.1.2",
    "react-native-safe-area-context": "3.2.0",
    "react-native-screens": "~3.0.0",
    "react-native-scrollable-tab-view": "1.0.0",
    "react-native-snap-carousel": "3.8.4",
    "react-native-star-rating": "1.1.0",
    "react-native-step-indicator": "0.0.11",
    "react-native-unimodules": "~0.13.3",
    "react-native-webview": "11.2.3",
    "react-navigation": "4.1.0",
    "react-navigation-drawer": "2.3.3",
    "react-navigation-stack": "2.0.16",
    "react-navigation-tabs": "2.7.0",
    "to-case": "2.0.0"
  },
  "devDependencies": {
    "anchorme": "1.1.2",
    "chalk": "2.4.2",
    "cli-spinner": "0.2.8",
    "commander": "2.19.0",
    "crypto-js": "3.1.9-1",
    "eslint": "5.6.0",
    "express": "4.16.4",
    "firebase-admin": "^8.9.2",
    "inquirer": "6.2.1",
    "jest-expo": "^41.0.0",
    "mexpo-cli": "3.5.1",
    "nodemailer": "6.3.1",
    "replace-in-file": "^5.0.2",
    "schedule": "0.4.0"
  }
  
  
}

as you have already noticed there is another error, the “Super expression must either be null or a function” message, that likely is referring to your particular problem. related TypeError: Super expression must either be null or a function · Issue #28423 · facebook/react-native · GitHub

Got the very same issue after upgrading sdk 38 to 39. The fix is nowhere to be found

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