question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[0.55.0] Metro Bundler can't listen on port undefined

See original GitHub issue

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?

screen shot 2018-04-03 at 2 44 27 pm

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:closed
  • Created 5 years ago
  • Reactions:22
  • Comments:29 (10 by maintainers)

github_iconTop GitHub Comments

20reactions
zen0wucommented, Apr 4, 2018

Apparently this is related to #18525, that issue fixes device but simulator is still broken, because port is not passed into buildProject.

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 issue

7reactions
kelsetcommented, Apr 4, 2018

First 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found