From 595eae8b67ccc33ce121a16ffdd90b8a9e3987ab Mon Sep 17 00:00:00 2001 From: Peter Cottle Date: Sun, 31 May 2015 12:53:54 -0700 Subject: [PATCH] [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 Test Plan: Imported from GitHub, without a `Test Plan:` line. --- Libraries/AppRegistry/AppRegistry.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Libraries/AppRegistry/AppRegistry.js b/Libraries/AppRegistry/AppRegistry.js index f36f88132..157cbaa37 100644 --- a/Libraries/AppRegistry/AppRegistry.js +++ b/Libraries/AppRegistry/AppRegistry.js @@ -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); },