DNS resolution issues with IPv6

Hi all,
I tried installing a package from npm and ran into a DNS resolution issue. npm was working fine a few days ago. Running npm i -g gh gives the following error:

npm ERR! code ENETUNREACH
npm ERR! syscall connect
npm ERR! errno ENETUNREACH
npm ERR! request to https://registry.npmjs.org/gh failed, reason: connect ENETUNREACH 2606:4700:9763:80e2:e439:0:6810:1023:443

I’ll list the results of a few ping commands:

> ping registry.npmjs.org
> PING registry.npmjs.org(2606:4700:83b3:80e2:e439:0:6810:1023 (2606:4700:83b3:80e2:e439:0:6810:1023)) 56 data bytes
> (...) icmp_seq=1 Destination unreachable: No route

> ping -4 registry.npmjs.org
> PING  (104.16.17.35) 56(84) bytes of data.
> 64 bytes from 104.16.17.35 (104.16.17.35): icmp_seq=1 ttl=60 time=6.35 ms
> 64 bytes from 104.16.17.35 (104.16.17.35): icmp_seq=2 ttl=60 time=7.22 ms

> ping amazon.com
> PING amazon.com (54.239.28.85) 56(84) bytes of data.
> 64 bytes from 54.239.28.85 (54.239.28.85): icmp_seq=1 ttl=230 time=297 ms
> 64 bytes from 54.239.28.85 (54.239.28.85): icmp_seq=2 ttl=230 time=316 ms

> ping google.com
> PING google.com(del11s08-in-x0e.1e100.net (2404:6800:4002:813::200e)) 56 data bytes
> (...) icmp_seq=1 Destination unreachable: No route

As you can see there is some issue with reaching certain websites when using IPv6. Also, I tried downloading a npm package from the browser and that worked fine.

I don’t know much about networking so any help with troubleshooting this will be appreciated.

P.S. I’m on a fully updated install of Endeavour OS:
KDE Plasma 5.27.0
Kernel 6.1.12-arch1-1
NetworkManager 1.42.0-1

I would recommend rephrasing your question, you’ll get more eyes on it. From your own admission, this has nothing to do with npm.

1 Like

Thanks for the suggestion. Done.

1 Like