mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Better error message when missing entry file (#29012)
Summary: If the entry file has been renamed (e.g., to `index.ts`), the script currently fails silently and prints out that the bundle file does not exist. This change will print the correct error message instead. ## Changelog [iOS] [Fixed] - Better error message when missing entry file Pull Request resolved: https://github.com/facebook/react-native/pull/29012 Test Plan: N/A Reviewed By: hramos Differential Revision: D22109657 Pulled By: TheSavior fbshipit-source-id: edd7b6f88becc954ee41ed01ae43efb4481adc95
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3e5a7b2939
commit
e73208e2ca
@@ -78,9 +78,14 @@ if [[ "$ENTRY_FILE" ]]; then
|
||||
# Use ENTRY_FILE defined by user
|
||||
:
|
||||
elif [[ -s "index.ios.js" ]]; then
|
||||
ENTRY_FILE=${1:-index.ios.js}
|
||||
else
|
||||
ENTRY_FILE=${1:-index.js}
|
||||
ENTRY_FILE=${1:-index.ios.js}
|
||||
else
|
||||
ENTRY_FILE=${1:-index.js}
|
||||
fi
|
||||
|
||||
if [[ $DEV != true && ! -f "$ENTRY_FILE" ]]; then
|
||||
echo "error: Entry file $ENTRY_FILE does not exist. If you use another file as your entry point, pass ENTRY_FILE=myindex.js" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [[ -s "$HOME/.nvm/nvm.sh" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user