cli
cli copied to clipboard
[DISCUSSION] Is it possible to add an option for using IPv6 only?
These days I have encounter a problem which is related to IPv4 & IPv6, here is the problem:
- Commands like
npm publishornpm viewwill fail with error connection timeout (connecting to IP of IPv4 of registry.npmjs.org) after default timeout (5 mins) - DNS resolving works normally, returns IPv4 IPs and IPv6 IPs
ping <IPv4 IP>workscurl -4 https://registry.npmjs.orgalways timed outcurl -6 https://registry.npmjs.orgworks
I understand that this is a network issue, not a bug, but I wonder if there is a possibility to add an option like ipv6Only to make npm-registry-fetch and npm only use IPv6 in certain conditions.
If it sounds reasonable, I can make a PR.
Thanks.
Related: [npm-registry-fetch issue](https://github.com/npm/npm-registry-fetch/issues/226)