skip to Main Content

After upgrading Expo SDK from 48 to 49, expo start works but after bundling i get two types of errors:
1- TypeError: Cannot read property ‘prototype’ of undefined, js engine: hermes
2- 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., js engine: hermes

First Error
Second Error

2

Answers


  1. Upgrade your react-navigation libraries too after upgrading. This is particular to the Drawer navigation. Generally upgrading them will solve this e.g.

    yarn upgrade @react-navigation/drawer@latest
    
    Login or Signup to reply.
  2. After upgrading from SDK 48 to SDK 49, I’m getting below error and when did ‘yarn upgrade to the react-navigation’ as per Joshua it didn’t solved.

    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., js engine: hermes
    at node_modules/react-native/Libraries/Core/ExceptionsManager.js:105:15 in reportException
    at node_modules/react-native/Libraries/Core/ExceptionsManager.js:150:4 in handleException
    - ... 7 more stack frames from framework internals
    
    TypeError: Cannot read property 'Together' of undefined, js engine: hermes
    at node_modules/react-native/Libraries/Core/ExceptionsManager.js:105:15 in reportException
    at node_modules/react-native/Libraries/Core/ExceptionsManager.js:150:4 in handleException
    at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:26:18 in handleError
    at node_modules/expo/build/errors/ExpoErrorManager.js:27:16 in createErrorHandler
    at node_modules/expo/build/errors/ExpoErrorManager.js:32:8 in <anonymous>
    at node_modules/@react-native/js-polyfills/error-guard.js:51:16 in ErrorUtils.applyWithGuard
    at node_modules/metro-runtime/src/polyfills/require.js:237:19 in guardedLoadModule
    at http://0.0.0.0:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:null in metroRequire
    at http://0.0.0.0:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:null in global
    

    Any help much appreciated.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search