You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invariant Violation: "myAppName" has not been registered #34893
i'm trying to running on ios emulator, but without success:
Invariant Violation: "myAppName" 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
metro is started, and build, so i think the problem is:
A module failed to load due to an error and AppRegistry.registerComponent wasn't called., js engine: hermes
Version
0.70.2
Output of npx react-native info
System:
OS: macOS 12.6
CPU: (8) arm64 Apple M1 Pro
Memory: 316.59 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.17.1 - /usr/local/bin/node
Yarn: Not Found
npm: 8.15.0 - /usr/local/bin/npm
Watchman: 2022.07.04.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /Users/mantegnous/.rvm/gems/ruby-2.7.5/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
Android SDK: Not Found
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9014738
Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild
Languages:
Java: 11.0.11 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: ^18.2.0 => 18.2.0
react-native: ^0.70.2 => 0.70.2
react-native-macos: Not Found
npmGlobalPackages: react-native: Not Found
Steps to reproduce
i'm running ios
Snack, code example, screenshot, or link to a repository
Problem solved by fixing deprecated-react-native-prop-types
Reacted by Muhammad Haqan Ali Rai, samiullah-dev, saiteja2420, ADITYA KUMAR, Neeraj Kumar, Divyesh, Skandh7, Chej Ahamed, shivasakteballan and Mireia Espuga
Reacted by Andy Irakoze, Alonso Hernandez, Bernardo Rodrigues, Serhii Solianenko, ripon haldar, Gopi P, Muhammad Waqar Shahid, Martin Vasquez and Mehmood724
I had this issue on 0.88.5, but the reason I had this error is because I'm using wix/react-native-navigation, I had to enter npx rnn-link to resolve this issue.
Could also be because in some native file, the project name is still have some rndiffapp in some native file.
Once I removed this alias from babel.config.js, mobile part started working correctly and web part was intact as well.
The error: "Invariant Violation: "myAppName" has not been registered" was resolved with this
Activity
Daha62 commentedon Oct 26, 2022
having the same problem
Daha62 commentedon Oct 31, 2022
Problem solved by fixing deprecated-react-native-prop-types
flexbox commentedon Jan 5, 2023
Hey @Daha62
If your problem is solved can you please close the issue?
It sparks joy for maintainers ✨
sam-houle1 commentedon Jan 12, 2023
@mantegnous did you fix the issue ? I'm having the same problem, solving the deprecated-react-native-prop-types issues did not help.
AlessioCamm commentedon Jan 16, 2023
Someone has fix this issue ? I got the error with Android, but not with iOS.
RalissonMattias commentedon Jan 17, 2023
I'm getting this on RN 0.71, any solution?
sam-houle1 commentedon Jan 17, 2023
I had this issue on 0.88.5, but the reason I had this error is because I'm using wix/react-native-navigation, I had to enter
npx rnn-linkto resolve this issue.Could also be because in some native file, the project name is still have some rndiffapp in some native file.
Yeasirarafat53 commentedon Jan 31, 2023
anyone solved this issue?
Sulemannnn commentedon Feb 7, 2023
i solved this problem by ending adb(32bit) from task manager then i run the project on my real device it successful worked
Sulemannnn commentedon Feb 7, 2023
let me know if this works for you guys as well thanks!
AdeelTanveerM commentedon Feb 11, 2023
Same here.
Haqan797 commentedon Mar 1, 2023
hassanharoon321 commentedon Mar 10, 2023
any solution?
21 remaining items
snanthagopal commentedon May 31, 2024
Same problem on 0.73.8
smit-luvani commentedon Jul 28, 2024
Were you able to resolve? Is it due to react-native-navigation (https://github.com/wix/react-native-navigation) package?
ganeshtak19 commentedon Oct 7, 2024
+1
facing same problem on 0.74.0
fionhua commentedon Oct 30, 2024
+1
facing same problem on "react-native": "0.74.5",
Sadman95 commentedon Dec 14, 2024
Hi
I am also facing the same issue though I have placed same name in the three places.
package.json

app.json

MainApplication.kt

ahmadprogrammer111 commentedon Jan 16, 2025
Yeah man it worked for me!!!
DevDK12 commentedon Jan 19, 2025
Probably this was causing error, I changed back name in app.json and its working fine now
ramilqO commentedon Jul 8, 2025
I solved this problem by changing name to required in AppRegistry.registerComponent("CORRECT_APP_NAME", () => App)
sehy0803 commentedon Jul 14, 2025
I also made sure that the project name was consistent across all settings, including app.json.
After that, I deleted the
index.android.bundlefile located atandroid/app/src/main/assets/in the project root.Then I regenerated the bundle by running the following command in the terminal:
npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundleThis resolved the issue for me.
jayeshuk commentedon Dec 31, 2025
I was having a
react-native-websetup in myreact-nativeproject to support web along with android and ios.In my case, I configured an alias which was supposed to be only in
webpack.config.js(for web) and not inbabel.config.js(for mobile):Once I removed this alias from
babel.config.js, mobile part started working correctly and web part was intact as well.The error: "Invariant Violation: "myAppName" has not been registered" was resolved with this
hariszulfiqar054 commentedon Mar 3, 2026
In my case it was a ts compile issue make sure to compile the code and resolve the error and reload the metro bundler
react-native-bot commentedon Aug 31, 2026
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
react-native-bot commentedon Sep 7, 2026
This issue was closed because it has been stalled for 7 days with no activity.