react-native-macos/Libraries/BatchedBridge
Vojtech Novak e27d656ef3 improve "not a registered callable module" error message (#28913)
Summary:
Motivation:

`Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication).` is an error that happens rarely, and most SO answers end up recommending to use `react-native bundle` to work around. I stumbled upon this error the other day and it took me a while to figure out that the error was caused by the fact that my `entryFile` path was pointing to an existing but invalid file. I figured it would be nice to mention this because I believe this will be a frequent cause of the error.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Changed] - improve "not a registered callable module error message"

Pull Request resolved: https://github.com/facebook/react-native/pull/28913

Test Plan:
tested locally with RNTester, prints

```
[Sun May 17 2020 18:15:55.396]  ERROR    Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). This can happen when the application entry file path is incorrect.
      On Android, verify 'getJSMainModuleName()' in 'MainApplication.java' and 'project.ext.react.entryFile' in 'android/app/build.gradle'.
      On iOS, verify '- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge' in 'AppDelegate.m' and 'ENTRY_FILE' env. variable passed to 'react-native-xcode.sh' (if any) in 'Build Phases' -> 'Bundle React Native code and images'.
```

in metro logs

Reviewed By: mdvacca

Differential Revision: D23107228

Pulled By: fkgozali

fbshipit-source-id: 0712ed7e593ba96b041578bafdbefcd09a3994b7
2020-08-13 18:30:38 -07:00
..
__mocks__ Back out "Upgrade Prettier from 1.17 to 2.0.2." 2020-03-24 21:47:35 -07:00
__tests__ improve "not a registered callable module" error message (#28913) 2020-08-13 18:30:38 -07:00
BatchedBridge.js Migrate large amount of modules to flow strict and strict-local 2020-07-22 09:46:16 -07:00
MessageQueue.js improve "not a registered callable module" error message (#28913) 2020-08-13 18:30:38 -07:00
NativeModules.js Migrate large amount of modules to flow strict and strict-local 2020-07-22 09:46:16 -07:00