You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Node: v5.4.1
OS: OS X 10.11.5 / Darwin Stevens-MBP 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
I've narrowed it down to the detect-port library used. I tested out the library's CLI and got similar results.
Is there anything unusual about your setup? Could you put some logs in its source and check where it’s spending the time? Could it be that a lot of ports after 3000 are busy on your computer for some reason?
My understanding is that the ipv4 library returns my local IP assigned by DHCP.
If I change this to 'host': '127.0.0.1', start time is almost instant. I get the Something else is running at port 3000 prompt if I run it while port 3000 is assigned.
The network stuff is out the scope of my knowledge.. Not sure what the implications are if this was just hardcoded to something like 127.0.0.1 and why using the local IP has any effect on it.
If anyone else is having this problem on OS X, easy fix is disconnect from your network and run start.
This takes about 1 minute to execute. It looks like if you have the OSX firewall enabled it will cause the long lag. I disabled the OSX firewall and it returns instantly.
Activity
gaearon commentedon Jul 30, 2016
Wow, a minute? 😮
Is there anything unusual about your setup? Could you put some logs in its source and check where it’s spending the time? Could it be that a lot of ports after 3000 are busy on your computer for some reason?
sdn90 commentedon Jul 31, 2016
I'm pretty sure I have a vanilla setup.
The problem is on this line:
https://github.com/xudafeng/detect-port/blob/master/lib/index.js#L64
My understanding is that the
ipv4library returns my local IP assigned by DHCP.If I change this to
'host': '127.0.0.1', start time is almost instant. I get theSomething else is running at port 3000prompt if I run it while port 3000 is assigned.The network stuff is out the scope of my knowledge.. Not sure what the implications are if this was just hardcoded to something like
127.0.0.1and why using the local IP has any effect on it.If anyone else is having this problem on OS X, easy fix is disconnect from your network and run start.
wolfie82 commentedon Jul 31, 2016
To note, I have the same experience.
❯ create-react-app --version
create-react-app version: 0.2.0
❯ npm -v
3.10.3
❯ node -v
v6.3.1
❯ uname -ra
Darwin bonk.local 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64
wolfie82 commentedon Jul 31, 2016
Just a little diagnostic.
❯ npm i detect-port -g
❯ detect --port 3000
This takes about 1 minute to execute. It looks like if you have the OSX firewall enabled it will cause the long lag. I disabled the OSX firewall and it returns instantly.
gaearon commentedon Jul 31, 2016
Thanks, this is very valuable info!
Can you check if the fix in #302 (comment) also works for you?
philstrong commentedon Aug 1, 2016
Yea also long startup and I also have firewall enabled.
gaearon commentedon Aug 1, 2016
@philstrong Does the fix in #302 (comment) work for you?
gaearon commentedon Aug 1, 2016
I can reproduce this by turning on the firewall and enabling “block all incoming connections”.
philstrong commentedon Aug 1, 2016
Yes it does fix the issue @gaearon
gaearon commentedon Aug 1, 2016
OK, I’ll test this on Windows and release a patch today if it works cross platform.
Fix port detection lag on OS X with Firewall enabled
Fix port detection lag on OS X with Firewall enabled (#319)
gaearon commentedon Aug 1, 2016
This should be fixed in the new version. Can you please verify?
Please find the upgrade instructions here.
xudafeng commentedon Aug 1, 2016
@gaearon node-modules/detect-port#4
gaearon commentedon Aug 1, 2016
Thank you so much! I will revert my commit and bump the version so we use
detect-portagain in 0.3.0.sdn90 commentedon Aug 1, 2016
Working for me 👍
Fix travis build (react#302)