[0.54.4] Metro Bundler can't listen on port undefined
See original GitHub issue- I have reviewed the documentation
- I have searched existing issues
- I am using the latest React Native version
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
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
Steps to Reproduce
Run react-native run-ios --device
in any React Native project using the latest 0.54.4
release.
Expected Behavior
Start the metro bundler correctly and continue compiling the application.
Actual Behavior
Metro bundler fails because the port is undefined.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Cannot read properties of undefined (reading 'transformFile ...
The error comes from the node version. So, you will need to downgrade. npx react-native info - // to see what node version...
Read more >React-Native Error Metro Bundler Can't Listen On Port 8081 ...
Whenever I run reactnative runios device it fails with Metro Bundler can't listen on port undefined. The issue has been fixed in #17983....
Read more >Cannot read property 'url' of undefined when starting server.js ...
TypeError: Cannot read property 'url' of undefined when starting server.js ... var io = socket_io.listen(server, {port: settings.port, ...
Read more >Port showing as undefined even though it's defined - Treehouse
Server running at http://undefined/ ... The "listen" method typically takes a port number as an argument (and an optional callback function) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
I’ve got the same issue as @jacktator and @wouterds