node v18.0.0 not returning local IP
Bonjour!
I use browser-sync, which uses this code as a dependency. I recently updated to node 18.0.0 without second thought and started getting the following error, where there was no external IP returned. The output looked like this:
[Browsersync] Access URLs:
----------------------------------
Local: http://localhost:3000
External: http://false:3000
----------------------------------
UI: http://localhost:3001
UI External: http://localhost:3001
----------------------------------
So I downloaded dev-ip, did some digging and it seems like for some reason address.family isn't returned as a string of IPv4 anymore, like in the original code, but as an integer 4.
Logging the addresses looks like this, without the unimportant bits:
{
address: '—',
netmask: '—,
family: 4,
mac: '—',
internal: false,
cidr: '—'
}
Any chance you could take a look? I've reverted back to node v17 in the meantime, but I feel like this problem might pop up for others as well.
I'm sorry if this isn't the most comprehensive ticket, I don't usually engage much with anything on github.
Cheers Felix