on Macs there generally is a special entry in /etc/hosts:
fe80::1%lo0 localhost
while trying something like this:
dns.resolve4('www.google.com', function (err, addresses) {
if (err) throw err;
console.log('addresses: ' + JSON.stringify(addresses));
});
it throws:
ipaddr.js:374
throw new Error('ipaddr: the address has neither IPv6 nor IPv4 format');
The problem can be avoided by removing that entry from /etc/hosts, but might occur in other scenarios as well. Not sure how to handle this strange entry appropriately.
on Macs there generally is a special entry in /etc/hosts:
fe80::1%lo0 localhost
while trying something like this:
it throws: ipaddr.js:374 throw new Error('ipaddr: the address has neither IPv6 nor IPv4 format');
The problem can be avoided by removing that entry from /etc/hosts, but might occur in other scenarios as well. Not sure how to handle this strange entry appropriately.