Invariant Violation: "AppName" has not been registered. This can happen if: * Metro (the local dev server) is run from the wrong folder.

See original GitHub issue

Environment

System: OS: Linux 5.4 Ubuntu 18.04.3 LTS (Bionic Beaver) CPU: (4) x64 Intel® Core™ i5-2500 CPU @ 3.30GHz Memory: 1.96 GB / 15.47 GB Shell: 4.4.20 - /bin/bash Binaries: Node: 13.10.1 - ~/.nvm/versions/node/v13.10.1/bin/node Yarn: Not Found npm: 6.14.5 - ~/.nvm/versions/node/v13.10.1/bin/npm Watchman: Not Found SDKs: Android SDK: Not Found IDEs: Android Studio: Not Found Languages: Java: 1.8.0_265 - /usr/bin/javac Python: 2.7.17 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.2 => 0.63.2 npmGlobalPackages: react-native: Not Found

Upgrading version

Previous version “react”: “16.9.0”, “react-native”: “0.61.5”

new version “react”: “16.13.1”, “react-native”: “0.63.2”

Description

This error was getting when I upgrade my project from 61.5 to 63.2

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:6

github_iconTop GitHub Comments

18reactions
super-potioncommented, Sep 21, 2020

@vikil143 how did you fix this? stuck on the same issue

11reactions
Mugambi-Iancommented, Jan 3, 2021

Change field name in ./app.json

{
  "name": "app-name",
  "displayName": "name"
}

to match ./android/app/src/main/java/com/{appName}/MainActivity.java

@Override
  protected String getMainComponentName() {
    return "app-name";
  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Invariant Violation: "main" has not been registered
Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the...
Read more >
has not been registered. this can happen if: * metro (the local ...
Invariant Violation : "main" has not been registered. This can happen if: Metro (the local dev server) is run from the wrong folder....
Read more >
"Application has not been registered" error
Your app root component may not be registered. Another possibility is that there is a mismatch between the AppKey being provided to AppRegistry....
Read more >
Metro (the local dev server) is run from the wrong folder ...
invariant violation : "main" has not been registered. this can happen if: * metro (the local dev server) is run from the wrong...
Read more >
invariant violation main has not been registered react-native
Application main has not been registered. Hint: This error often happens when you're running the packager (local dev server) from a wrong folder....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found