You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `yarn start` command in `packages/rn-tester` was failing because the
binary name in the `react-native` package didn't match the package name
`react-native-macos`.
## Problem
- Running `yarn start` in `packages/rn-tester` resulted in "command not
found: react-native-macos"
- Users had to use `npx react-native-macos start` as a workaround
- The issue was that the `bin` field in
`packages/react-native/package.json` defined the binary as
`"react-native"` instead of `"react-native-macos"`
## Solution
1. **Updated binary name**: Changed the `bin` field in
`packages/react-native/package.json` from `"react-native": "cli.js"` to
`"react-native-macos": "cli.js"` to match the package name
2. **Fixed script paths**: Updated the `start` and `android` scripts in
`packages/rn-tester/package.json` to use the correct relative path to
the binary: `../../node_modules/.bin/react-native-macos`
## Testing
- ✅ `yarn start` now works from `packages/rn-tester` directory
- ✅ `yarn start` works from root directory (delegates to rn-tester)
- ✅ `npx react-native-macos start` continues to work as before
- ✅ Test scripts in `scripts/objc-test.sh` continue to work (they use
`yarn start` from rn-tester context)
Both the standard React Native workflow (`yarn start`) and the existing
workaround (`npx react-native-macos start`) now function correctly.
Fixes#2528.
> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> -
`https://api.github.com/repos/react-native-community/rn-diff-purge/tags`
> - Triggering command: `node
/home/REDACTED/work/react-native-macos/react-native-macos/node_modules/.bin/react-native
start ` (http block)
> - Triggering command: `node ../../node_modules/.bin/react-native-macos
start ` (http block)
> - Triggering command: `/usr/local/bin/node
../../node_modules/.bin/react-native-macos start ` (http block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to my [firewall allow
list](https://gh.io/copilot/firewall-config)
>
> </details>
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 Share your feedback on Copilot coding agent for the chance to win a
$200 gift card! Click
[here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to
start the survey.
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Saadnajmi <[email protected]>
0 commit comments