Skip to content

Library not detecting port is in use #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
KyleAMathews opened this issue Mar 21, 2017 · 5 comments · Fixed by #20
Closed

Library not detecting port is in use #17

KyleAMathews opened this issue Mar 21, 2017 · 5 comments · Fixed by #20
Assignees
Labels

Comments

@KyleAMathews
Copy link

I'm using this lib with Gatsby having borrowed the idea from create-react-app. It had been working great but it's now for whatever reason not detecting used ports.

I start a gatsby instance on port 8000 and then another and detect-port tells me 8000 is open but when gatsby tries starting in the second instance, it gets an EADDRINUSE.

I've tried this on node 6 and 7.

Does it matter that Gatsby is listening on 0.0.0.0?

@KyleAMathews
Copy link
Author

Oh and I'm on a macOS Sierra 10.12.3

@egoist
Copy link

egoist commented Apr 15, 2017

I met the same issue while I run my project on localhost

@sorrycc
Copy link

sorrycc commented Apr 30, 2017

I got the same issue, and [email protected] works.

@fengmk2
Copy link
Member

fengmk2 commented May 11, 2017

Maybe bug here, I will check it and fix it today.

@fengmk2 fengmk2 added the bug label May 11, 2017
@fengmk2 fengmk2 self-assigned this May 11, 2017
@d4rkr00t
Copy link

Bug is actually here https://github.com/node-modules/detect-port/blob/master/lib/detect-port.js#L47

I fixed it in my project like this: https://github.com/d4rkr00t/aik/blob/master/src/utils/detect-port.js#L12

Basically you need to specify a host.

fengmk2 added a commit that referenced this issue May 11, 2017
fengmk2 added a commit that referenced this issue May 11, 2017
fengmk2 added a commit that referenced this issue May 11, 2017
should check current ip too

- closes #17
- closes #19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants