-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invariant Violation: Module AppRegistry is not a registered callabel module (calling runApplication) #26687
Comments
Unfortunately, this error does not give any feedback on what exactly is wrong. You need to dig deeper. |
Here are logs from Xcode:
|
Did you try to enable the Debug option? |
Getting this same issue but only on Android. Very weird :( |
Yes, I also tried toggling Fast Refresh off. |
Fixed the issue on my end by double checking that i modified all the files correctly during my RN upgrade, then running |
Unfortunately, it doesn't work our project (iOS) @m4rcoperuano. Glad it worked for you |
It's hard to suggest anything without any more details, I would say that you can try commenting out some parts of your code and try until you find something. |
yeah me too, |
Ok will do. This will take a bit of time. We essentially have 2 apps that are linked so changes have to be done for 4 environments (2x iOS and 2x Android). Will report back if I find a solution to this. |
@Hugo-Meiring Probably you use modules that were removed from |
So, unfortunately, I just can't get this working. If I get iOS working, Android breaks. If android is working, iOS breaks. This is just one of the issues that I ping pong between depending on the platform. I can't spend more time on this as this is cutting into the release schedule. Will go with a temporary fix of splitting iOS and Android between different react versions and making adjustments to the CI/CD pipeline. A very nasty solution but it might be for the better. We can possibly move all our shared code to a separate repo while we analyze our options. |
@Hugo-Meiring I'm facing a similar issue on a monorepo (using lerna and yarn workspaces). I found that everything works ok when I start the app without using anything from an external package. Even the fast refresh works correctly if I comment the LOC related to external packages, start the app and finally un-comment those lines. |
Also ran into this (setup below). Took a bit of @m4rcoperuano 's solution and just stopped my simulator and bundler, then removed everything in watchman via Setup
|
This resolved it for me: $ cd ios && rm -rf Pods && pod cache clean --all && pod install && cd .. I forgot that I had done a "yarn add ..." on a few NPM modules and forgot to reinstall the pods. |
I have fixed this error, can confirm it's because one of your libraries isn't linked correctly. Fastest way to fix this is starting from index.js to app.js commenting out imports. Once you've commented out enough libraries the app should work then you will know which library was not linked correctly. Some libraries that say they have auto-linking actually don't..... It's very tedious but this works and my app is now fully functioning! |
Why does it have to be so difficult to find out WHICH Native Module cannot be null? |
Hi! I have the same issue, both on android and iOS. I just remove node_modules and install again, it helps me) no other cleans or rebuilds has no effect( |
This is just a vague error to tell you there's something wrong with one of your imports. It can have different causes and has different solutions for each cause. In my case, this was happening because of a circular dependency. |
https://github.com/react-native-community/cli#compatibility denotes that react-native 0.61.X needs react-native-cli: 3.0.0 |
This solved it for me, using a managed Expo project:
|
Another possible reason for this is that there are multiple versions of react-native in node_modules |
Try searching for |
This was the issue for us - we jumped from RN 0.58 to RN 0.61.5 where some RN stock components were removed. |
I face same problem just now and try any suggestion but noting change 😢 when I remove my computer everywhere so I guess maybe are multiple versions of react-native in node_modules ? my steps
|
i had the same problem, when i used react-navigation package, but i had not downloaded all the required "side-packages" (particularly is react-native-reanimated). The problem may come from one of your import. Check the guide of all packages carefully, you would definitely find a way. Good luck!! |
Just spent a couple hours trying to figure this out, tried everything, and turns out it was because I was calling Stylesheet without importing it in one file... |
I hade the Same Issue but the problem was because I had the colors in a separated folder and in one of components I refers to a non-existing color... . But it didn't say where exactly the problem is! Hope it helps you... |
If you tried all options given and not working, the issue is with the Drawer navigator |
it will update it no problem with that.
…On Wed, Oct 27, 2021 at 6:00 PM Nycollas ***@***.***> wrote:
delete no_modules
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#26687 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALWJRQ247RTWHZMG5RDT6ADUJAHYRANCNFSM4I4VHNKQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I solved this issue just by adding import { AppRegistry } from "react-native"; to my index.js |
I think there is no solution for this, for me it worked after reinstalling and clearing caches several times, My steps was, removed node_module
repeated several time suddenly it worked. 😕 |
BUNDLE ./index.js ERROR Error: Cannot create styled-component for component: undefined. ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. Already tried:
/**
import { AppRegistry } from "react-native"; No solution found on stackoverflow! |
For me, the issue was my application package name. Actually, I was reusing the source code of the existing app to make a replica of the same app. So I kept the "build_config_package" the same as an old app but changes the package name. |
1- update your react-native-reanimated library to "react-native-reanimated": "2.0.0" 2- You should update the babel.config.json file and add react-native-reanimated/plugin to plugins
This will fix your issue |
Well this was pretty dumb in my case. We're using React Native Brownfield and I made an update to add a new package:
Well |
Facing same problem on ios, after deleting |
For me the fix was to comment the most recent style files I've worked on, and uncomment them one by one. |
your comment really helped me |
I have been having this issue on and off. What I have found most reliable is to delete and reinstall pods. This error message has also shown up on my end when running a different application in xcode than what metro is running. Happens when I forget to kill metro when switching projects whilst having two instances of xcode open. |
I solved this issue, I tried to rebuild my app with a new lib that I installed, but it was bugging my app, then I delete the app in my VM (virtual machine) and I remove some dependecies that I've inserted manually, the files that I change were: android\settings.grandle and \android\app\src\main\java\com<nameProject>\MainApplication.java. I run it's work :) |
One single error but there might be multiple causes. Seeing a lot of diverse discussions in the community means this issue could be hard to find. Try to proceed with the following.
If you still cannot find the issue with the above, remove some imports or screens from your App.js. Going with this you can find what exactly caused this error. This is how I found my issue after a day of research. |
Best solution 🥳 , I was investigating by eliminating imports from my index.js, until I found the problem. Thanks! |
In time to find out what's wrong or your task is blocked, this maybe the best solution to try. |
For me this helped me find the problem, to which file was causing the error. (Root cause) I made sure my metro.config.js file contained this line: |
For anyone else who facing the same issue and cannot resolve it with every solution you found on the internet, maybe you shoud check if there is a |
Bro, I don't know you but you saved me after 3 days of pulling my hair out!! |
In case it helps others... None of the answers above worked for me. I cleaned my iOS pods, npm packages, etc... and also verified that all of my 3rd party package and internal component imports were correct, and was still receiving the error. After two hours, I finally tried quitting the app, uninstalling it, quitting metro, restarting it, then reinstalling the app and it worked! I believe the crucial step was restarting metro... |
Seeing this now on a RN app with multiple devs - had one teammate with this issue b/c he was running Still struggling with this issue as of now on my own machine after trying all the above solutions |
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. |
This issue was closed because it has been stalled for 7 days with no activity. |
Currently on React Native 0.61.0-rc.3, updating to 0.61.1 causes this issue.
React Native version:
Steps To Reproduce
react-native init
)yarn && cd ios && pod install && cd .. && yarn start
+yarn ios
)Describe what you expected to happen:
The app should be running like on 0.61.0-rc.3. What major changes where made between the release candidate and 0.61.0 (also your website still show 0.60.0 as the latest version). Here is the source code changes between the two:
https://react-native-community.github.io/upgrade-helper/?from=0.61.0-rc.3&to=0.61.1
Snack, code example, screenshot, or link to a repository:
Can't be provided, production and private react-native init application.
The text was updated successfully, but these errors were encountered: