mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-13 12:26:45 +08:00
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:
committed by
Facebook Github Bot
parent
54534e79d7
commit
46aaa02274
@@ -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."));
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user