Make the load-script-error less misleading (#17055)

Summary:
For most cases, people saw this error when they are running a debug version. So they should check metro server first. However, they were misled to search for "bundle" keywords and finally they executed "react-native bundle" command and got an app that can never reload.
Pull Request resolved: https://github.com/facebook/react-native/pull/17055

Differential Revision: D13421737

Pulled By: cpojer

fbshipit-source-id: 8e108df06b7d416a74c33581457f3213b28306c1
This commit is contained in:
Sunny Luo
2019-01-28 08:18:42 -08:00
committed by Facebook Github Bot
parent 54534e79d7
commit 46aaa02274

View File

@@ -59,8 +59,9 @@ std::unique_ptr<const JSBigString> loadScriptFromAssets(
}
}
throw std::runtime_error(folly::to<std::string>("Unable to load script from assets '", assetName,
"'. Make sure your bundle is packaged correctly or you're running a packager server."));
throw std::runtime_error(folly::to<std::string>("Unable to load script. Make sure you're "
"either running a Metro server (run 'react-native start') or that your bundle '", assetName,
"' is packaged correctly for release."));
}
}}