DEV Community

Dênis Mendes
Dênis Mendes

Posted on

Error: reason: connect ENETUNREACH 2606:4700::6810:1023:443

If you're experiencing that kind of error message when trying to install something related with NodeJS in docker container, you should try that trick, in your Dockerfile adds that command:

ENV NODE_OPTIONS="--dns-result-order=ipv4first"

See my Dockerfile:

FROM node:18.15.0

ENV NODE_OPTIONS="--dns-result-order=ipv4first"

RUN npm install -g @nestjs/cli
Enter fullscreen mode Exit fullscreen mode

I hope it helps you in some way.

Top comments (0)