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
Recently I ran into the issue "localhost" not being consistently resolved to the same loopback address. Sometimes it would lookup IPv6 loopback ::1 and sometimes to IPv4 127.0.0.1. After investigation I figured out that resolved IP depended on the nodejs version and I had different nodejs version in different shells. So v16 was resolving localhost to IPv4 and v18 to IPv6. I am not 100% sure this behavior is consistent with other systems, but here is the way to reproduce:
Recent nodejs release v18, specifically nodejs/node#41431 PR is the source of this difference and I have not gone deeper to why for now. Important thing is that we can't 100% say what it will bind to. I think just using 127.0.0.1 by default will more consistent.
The text was updated successfully, but these errors were encountered:
Recently I ran into the issue "localhost" not being consistently resolved to the same loopback address. Sometimes it would lookup IPv6 loopback
::1
and sometimes to IPv4127.0.0.1
. After investigation I figured out that resolved IP depended on the nodejs version and I had different nodejs version in different shells. So v16 was resolvinglocalhost
to IPv4 and v18 to IPv6. I am not 100% sure this behavior is consistent with other systems, but here is the way to reproduce:Recent nodejs release v18, specifically nodejs/node#41431 PR is the source of this difference and I have not gone deeper to why for now. Important thing is that we can't 100% say what it will bind to. I think just using
127.0.0.1
by default will more consistent.The text was updated successfully, but these errors were encountered: