From a41469363d71763ba673895e8660948c8dd673a6 Mon Sep 17 00:00:00 2001 From: Raymond Jacobson Date: Fri, 22 May 2026 13:07:33 -0700 Subject: [PATCH] ci(mobile): symlink react-native CLI for CodePush OTA bundling After #14365 the react-native dep is hoisted to the monorepo root node_modules/, so packages/mobile/node_modules/.bin/react-native no longer exists. @bravemobile/react-native-code-push@12.3.2 hardcodes the relative path `node_modules/.bin/react-native` (cwd = packages/mobile) when running `react-native bundle`, which fails with exit 127. Symlink the hoisted bin into packages/mobile/node_modules/.bin in both OTA jobs before invoking code-push. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/mobile.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml index 5b1d99917af..c05fc0e833f 100644 --- a/.github/workflows/mobile.yml +++ b/.github/workflows/mobile.yml @@ -285,6 +285,15 @@ jobs: echo "channel=rc" >> "$GITHUB_OUTPUT" fi + # @bravemobile/react-native-code-push@12.3.2 hardcodes + # `node_modules/.bin/react-native` relative to cwd. After #14365 the + # react-native dep hoists to root node_modules, so the bin is only at + # ./node_modules/.bin/react-native — not packages/mobile/node_modules/.bin/. + - name: Symlink react-native CLI into packages/mobile/node_modules/.bin + run: | + mkdir -p packages/mobile/node_modules/.bin + ln -sf "$(pwd)/node_modules/.bin/react-native" packages/mobile/node_modules/.bin/react-native + - name: Publish OTA update (${{ matrix.platform }}) env: OTA_S3_BUCKET: ${{ secrets.OTA_S3_BUCKET }} @@ -390,6 +399,15 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-east-1 + # @bravemobile/react-native-code-push@12.3.2 hardcodes + # `node_modules/.bin/react-native` relative to cwd. After #14365 the + # react-native dep hoists to root node_modules, so the bin is only at + # ./node_modules/.bin/react-native — not packages/mobile/node_modules/.bin/. + - name: Symlink react-native CLI into packages/mobile/node_modules/.bin + run: | + mkdir -p packages/mobile/node_modules/.bin + ln -sf "$(pwd)/node_modules/.bin/react-native" packages/mobile/node_modules/.bin/react-native + - name: Publish OTA update to production (${{ matrix.platform }}) env: OTA_S3_BUCKET: ${{ secrets.OTA_S3_BUCKET }}