Expo: Module AppRegistry is not a registered - Status Code: 2

Created on 20 Jan 2018  路  3Comments  路  Source: expo/expo

Exp version 48.0.2

Error: Module AppRegistry is not a registered callable module (calling runApplication)

Error Code: CLIENT_LOADING_ERROR

Status Code: 2

I did a search in all my code apart from node_modules and I do not have any AppRegistry being used.

When I run the ios simulator from my machine, there are no errors. But after completion of the compilation, and running the project on my iPhone I get the above message. No error message in the expo compilation log either.

Any advice on how to trace this error would be great thank you.

app.json

{
  "expo": {
    "name": "Project",
    "icon": "./src/assets/something.png",
    "version": "1.0.1",
    "slug": "nameofproject",
    "sdkVersion": "23.0.0",
    "ios": {
      "bundleIdentifier": "com.company.project"
    },
    "android": {
      "package": "com.company.project"
    }
  }
}

Thank you.

Most helpful comment

So I managed to figure it out.

After starting your expo project using npm start, hit d in the terminal to change the build from development to production, then i to see your app run in the emulator. You should now see a red screen. In my case, it was PropStyles existing in installed packages they were throwing this error. So I went into those and removed those and created a pull request for those.

All 3 comments

Any help with this would be much much appreciated, the Same thing happens with the standalone Expo app and running the simulator, no indication of an issue.

Thank you

img_0961

So I managed to figure it out.

After starting your expo project using npm start, hit d in the terminal to change the build from development to production, then i to see your app run in the emulator. You should now see a red screen. In my case, it was PropStyles existing in installed packages they were throwing this error. So I went into those and removed those and created a pull request for those.

In you appDelegate find jsCodeLocation and then replace with below code. It works for me

    var jsCodeLocation : URL? = nil

  #if DEBUG
      jsCodeLocation = URL.init(string: "http://127.0.0.1:8081/index.ios.bundle?platform=ios&dev=true")
    #else
      jsCodeLocation = CodePush.bundleURL()
    #endif
Was this page helpful?
0 / 5 - 0 ratings