title: How to install node packages in ubuntu server with IPv6 only
body: <p>I'm trying to install typescript on an Ubuntu server where only IPv6 address space is available.</p>
  
  <p>I'm getting error as follows. Any help?</p>
  
  <pre><code>:/home/dev/.nvm# npm install --global typescript
  npm ERR! code ENOTFOUND
  npm ERR! errno ENOTFOUND
  npm ERR! network request to https://registry.npmjs.org/typescript failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
  npm ERR! network This is a problem related to network connectivity.
  npm ERR! network In most cases you are behind a proxy or have bad network settings.
  npm ERR! network
  npm ERR! network If you are behind a proxy, please make sure that the
  npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /root/.npm/_logs/2017-11-01T19_15_39_294Z-debug.log
  </code></pre>
  
  <p>The error of this network connectivity happens with many packages and even github. I installed nvm in a slightly different way by setting the codebase in bitbucket.</p>
  
  <p>I tried to install npm and n to setup typescript using n. That failed and I started using nvm as alternative. PFB the logs when trying to install n.</p>
  
  <pre><code>    :~# sudo npm install -g n
  npm ERR! Linux 4.4.0-98-generic
  npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "n"
  npm ERR! node v4.2.6
  npm ERR! npm  v3.5.2
  npm ERR! code ENETUNREACH
  npm ERR! errno ENETUNREACH
  npm ERR! syscall connect
  
  npm ERR! connect ENETUNREACH ::ffff:151.101.208.162:80 - Local (:::0)
  npm ERR!
  npm ERR! If you need help, you may report this error at:
  npm ERR!     &lt;https://github.com/npm/npm/issues&gt;
  
  npm ERR! Please include the following file with any support request:
  npm ERR!     /root/npm-debug.log
  </code></pre>
  
  <p>I just need some way to get it installed but no luck! I strongly believe it is IPv6 issue and looking for work around. </p>
  
  <p>Btw, my ubuuntu server is 16.04.3 LTS. I have installed it successfully on IPv4 servers running on Ubuntu 16.10 and 17.04 version and here in Production, I'm locked! </p>