Hi, I'm running the latest version of React Native and all goes well, except running from CLI to your device. Whenever I run react-native run-ios --device it fails with Metro Bundler can't listen on port undefined.
The issue has been fixed in https://github.com/facebook/react-native/pull/17983 however, but is scheduled for 0.55. Which makes the current latest version just unusable and broken. Backport needed asap.
Environment:
OS: macOS High Sierra 10.13.3
Node: 9.8.0
Yarn: 1.3.2
npm: 5.7.1
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: Not Found
Packages: (wanted => installed)
react: ^16.3.0 => 16.3.0
react-native: ^0.54.4 => 0.54.4
Run react-native run-ios --device in any React Native project using the latest 0.54.4 release.
Start the metro bundler correctly and continue compiling the application.
Metro bundler fails because the port is undefined.
This is happening on 55 as well
`Environment:
OS: macOS High Sierra 10.13.3
Node: 8.6.0
Yarn: 1.5.1
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 3.1 AI-173.4670197
Packages: (wanted => installed)
react: ^16.3.0-alpha.0 => 16.3.0
react-native: 0.55.0 => 0.55.0`
โ /Users/abc/Apps/testText/node_modules/react-native/React/Base/RCTBundleURLProvider.m:15:53: use of undeclared identifier 'undefined'; did you mean 'underline'?
const NSUInteger kRCTBundleURLProviderDefaultPort = RCT_METRO_PORT;
As this is already fixed in master, closing as Fixed.
0.55 should be getting released any moment. You may also discuss cherry-pick requests over at https://github.com/react-native-community/react-native-releases.
Switching to react-native: 0.52.2 solved this for me
Downgrading is not an acceptable solution. I noticed 0.55 was just released, I'll give it a try!
Update: I see that the patch is included in 0.55, but it does not work anymore (while it used to if you manually changed it in 0.54.4). So we're still left with a broken release, afaics.
Same issue here with @wouterds
I've got the same issue as @jacktator and @wouterds