mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-06 17:27:54 +08:00
[ErrorMessage] Change error message when app is not registered
Summary: So when I first started porting JS files over from LearnGitBranching into a react native project, I some had require errors (for whatever reason) and I hit this error message a decent amount. I eventually understood it had nothing to do with failing to register the component (which btw sounds like some sign-up process, not actually an internal concept) but I figured we could expand on this message and describe why it might be happening. I'm not 100% sure on what the second half should be, but open to feedback on this Closes https://github.com/facebook/react-native/pull/826 Github Author: Peter Cottle <pcottle@fb.com> Test Plan: Imported from GitHub, without a `Test Plan:` line.
This commit is contained in:
@@ -74,7 +74,9 @@ var AppRegistry = {
|
||||
);
|
||||
invariant(
|
||||
runnables[appKey] && runnables[appKey].run,
|
||||
'Application ' + appKey + ' has not been registered.'
|
||||
'Application ' + appKey + ' has not been registered. This ' +
|
||||
'is either due to a require() error during initialization ' +
|
||||
'or failure to call AppRegistry.registerComponent.'
|
||||
);
|
||||
runnables[appKey].run(appParameters);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user