mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
f5aa52399b
Summary: In environments with McAfee EPro software, port 8081 is used and cannot be unbound. (See [#20466](https://github.com/facebook/react-native/issues/20466) for a recent example issue.) Most issues can be worked around by passing a `--port` option or setting `RCT_METRO_PORT`, but there are a couple places where 8081 is hardcoded that block adoption. Right now the workaround I've seen pushed on Stack Overflow and elsewhere is to modify node_modules after a `yarn install`, so I'd like to fix it at the source. This PR changes the react "Start Packager" build step and some code in the iOS DevSupport library to read from the `RCT_METRO_PORT` variable. ## Changelog [General] [Changed] - Removed hardcoded references to port 8081 and replaced them by reading from RCT_METRO_PORT (w/ fallback to 8081) Pull Request resolved: https://github.com/facebook/react-native/pull/25144 Differential Revision: D15630119 Pulled By: cpojer fbshipit-source-id: aff5d24691e0e9892a035cfbd25330fed6441199