Is autoSelectFamily
possible to counteract Node.js 18 dns.lookup changes?
#2235
Unanswered
MikeMcC399
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to use
autoSelectFamily
from socket.connect(options[, connectListener]) of Node.js 18 and later to check if a development server is running or not, when the hostname islocalhost
and you don't know beforehand if it is listening on the IPv4127.0.0.1
loopback address or on the IPv6::1
loopback address?This is turning out to be a problem with some dev servers, for instance Angular or Vite, as GitHub has now migrated their runners to use Node.js 18 as default and the change in logic in Node.js has kicked in. Node.js 17.0.0 introduced the change in nodejs/node@1b2749ecbe "(SEMVER-MAJOR) dns: default to verbatim=true in dns.lookup()". (See History in dns.lookup(hostname[, options], callback).)
Beta Was this translation helpful? Give feedback.
All reactions