[0.55.0] Metro Bundler can't listen on port undefined
See original GitHub issue- I have reviewed the documentation
- I am using the latest React Native version
- I have searched existing issues
I am following up on closed issue #18673. This still seems to be an issue. Here’s a screenshot of what I’m experiencing. Is there something I am missing?
Environment
OS: macOS High Sierra 10.13.3 Node: 7.9.0 Yarn: Not Found npm: 4.2.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 => 16.3.0 react-native: 0.55.0 => 0.55.0
Steps to Reproduce
react-native init AwesomeProject
cd AwesomeProject
react-native run-ios
Expected Behavior
Build Successful!
Actual Behavior
Metro Bundler can’t listen on port undefined
Issue Analytics
- State:
- Created 5 years ago
- Reactions:22
- Comments:29 (10 by maintainers)
Top Results From Across the Web
React-Native Error Metro Bundler Can't Listen On Port 8081 ...
Enable iOS simulator's Connect hardware keyboard from menu Hardware > Keyboard menu. Something is probably already running on port 8081.
Read more >React native ERROR Packager can't listen on port 8081
On a mac, run the following command to find id of the process which is using port 8081 sudo lsof -i :8081
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 >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 >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
Apparently this is related to #18525, that issue fixes device but simulator is still broken, because
port
is not passed intobuildProject
.https://github.com/facebook/react-native/blob/master/local-cli/runIOS/runIOS.js#L130
Adding
args.port
as the last argument to this function call should temporarily fix the issueFirst off, PLEASE don’t pollute the issue with useless ‘same issue’ comments.
There are the reactions for indicating that this issue is present.
That said, please don’t use 0.55.0 because it ships with the wrong version of React. We are going to release soon a new version.