nodejs | getaddrinfo ENOTFOUND undefined

Viewed 867

I'm stuck with the below error when trying to run a simple server with express.

Listening on port 3000
Error: getaddrinfo ENOTFOUND undefined
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26)
Error: getaddrinfo ENOTFOUND undefined
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26)

Application versions

  • node: 16.14.0
  • mac: 12.2.1
  • express: 4.17.1
  • express-http-proxy: 1.6.0
  • express-session: 1.17.0

/etc/hosts file

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1 localhost
# Added by Docker Desktop
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section

It seems like a common problem for a lot of people. I would appreciate any help to resolve this issue.

0 Answers
Related