Skip to content

Commit afac7a9

Browse files
authored
fix: explicitly install expo-asset for expo mega app (#6692)
1 parent 8fae333 commit afac7a9

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

build-system-tests/scripts/mega-app-install.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ while [[ $# -gt 0 ]]; do
2424
BUILD_TOOL=$2
2525
shift
2626
;;
27+
-b | --build-tool-version)
28+
BUILD_TOOL_VERSION=$2
29+
shift
30+
;;
2731
-n | --name)
2832
MEGA_APP_NAME=$2
2933
shift
@@ -115,6 +119,11 @@ else
115119
DEPENDENCIES="$DEPENDENCIES react-native-safe-area-context@^4.2.5"
116120
fi;
117121

122+
# expo-asset is nested under expo/node_modules in expo 52, causing Metro resolution issues
123+
if [[ "$BUILD_TOOL" == "expo" && $BUILD_TOOL_VERSION > "51" ]]; then
124+
DEPENDENCIES="$DEPENDENCIES expo-asset"
125+
fi
126+
118127
echo "npm install $DEPENDENCIES"
119128
install_dependencies_with_retries npm "$DEPENDENCIES"
120129
if [[ "$BUILD_TOOL" == "expo" ]]; then

build-system-tests/scripts/setup-mega-app.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ BASE_OPTIONS="--build-tool $BUILD_TOOL --name $MEGA_APP_NAME --framework $FRAMEW
9191
./scripts/mega-app-copy-files.sh $BASE_OPTIONS
9292

9393
# Install dependencies
94-
./scripts/mega-app-install.sh $BASE_OPTIONS --pkg-manager $PKG_MANAGER --tag $TAG
94+
./scripts/mega-app-install.sh $BASE_OPTIONS --pkg-manager $PKG_MANAGER --tag $TAG --build-tool-version $BUILD_TOOL_VERSION
9595

9696
# Build mega app
9797
./scripts/mega-app-build.sh $BASE_OPTIONS --platform $PLATFORM

0 commit comments

Comments
 (0)