npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

npm fails to install on IPv6 only networks

[note: the forum does not let me post it correctly, as the post is limited to 5 urls - I have modified the URL output below so that I can post here]

What I Wanted to Do

Install node-red using npm install node-red

What Happened Instead

An “ENETUNREACH” error occured

Reproduction Steps

Important: the IPv6 only host CAN reach URL1 via NAT64 - a connection is possible, if npm was using IPv6.


nodejshost:~$ npm install node-red
npm ERR! request to URL1/node-red failed, reason: connect ENETUNREACH IP1:443 - Local (

npm ERR! A complete log of this run can be found in:
npm ERR! /home/app/.npm/_logs/2019-08-16T08_41_18_332Z-debug.log


0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/bin/node’, ‘/usr/bin/npm’, ‘install’, ‘node-red’ ]
2 info using npm@6.9.0
3 info using node@v10.16.0
4 verbose config Skipping project config: /home/app/.npmrc. (matches userconfig)
5 verbose npm-session 958a6ab568040871
6 silly install loadCurrentTree
7 silly install readLocalPackageData
8 silly fetchPackageMetaData error for nodered@latest request to [URL] failed, reason: connect ENE
TUNREACH :443 - Local (
9 timing stage:rollbackFailedOptional Completed in 2ms
10 timing stage:runTopLevelLifecycles Completed in 242ms
11 verbose type system
12 verbose stack FetchError: request to URL1/nodered failed, reason: connect ENETUNREACH IP1:443

21 verbose exit [ 1, true ]

registry is actually reachable:

nodejshost:~$ curl -I URL1/node-red
HTTP/2 200 
date: Fri, 16 Aug 2019 14:38:47 GMT
content-type: application/json
content-length: 233097
set-cookie: __cfduid=da55720ceef5a3cb2c12da328d8b8706b1565966327; expires=Sat, 15-Aug-20 14:38:47 GMT; path=/;; HttpOnly
cf-cache-status: HIT
cache-control: max-age=300
cf-ray: 5074276978633eae-ZRH
accept-ranges: bytes
age: 4848
etag: "c4fd5e736f7ec287d9f0a0c5c266dc29"
expect-ct: max-age=604800, report-uri=""
last-modified: Fri, 05 Jul 2019 10:48:30 GMT
vary: accept-encoding, accept
x-amz-meta-rev: 174-d2d2e19e1a41a37db439ea4aae471997
server: cloudflare


Platform Info

$ npm --versions
nodejshost:~$ npm --versions
{ npm: '6.9.0',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '35.1',
  http_parser: '2.9.2',
  icu: '64.2',
  modules: '64',
  napi: '4',
  nghttp2: '1.34.0',
  node: '10.16.0',
  openssl: '1.1.1c',
  tz: '2019a',
  unicode: '12.1',
  uv: '1.29.1',
  v8: '',
  zlib: '1.2.11' }

$ node -p process.platform

I can confirm that this is still an issue. I am using an IPv6 only host on vultr and have confirmed all of the above mentioned by nicoschottelius is accurate, including that the registry is still reachable by curl, but not npm install.

Is there a workaround for now?

I found a workaround that forces the resolution of to the IPv6 address by appending:


to the /etc/hosts file in linux.