Npm throw an error after update to nodejs 8

Adidi

After I update my nodejs to the latest version I always get error when trying to run npm install to install packages:

npm WARN registry Using stale data from http://registry.npmjs.org/ because the host is inaccessible -- are you offline?
npm WARN registry Using stale package data from http://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to http://registry.npmjs.org/escope failed,      reason: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:80
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'

I don't have any issues with my internet connection and I disable the route to https: https://registry.npmjs.org and replace it with http - the first install worked and right after start not working again.

node version 8.2.1

npm version 5.3.0

Thanks for any help.

Adidi

If it's helps to anyone: The only solution that works for me is to ping registry to find the IP. and the fact I have got the IP means I am not blocked

ping registry.npmjs.org

64 bytes from registry.npmjs.org (151.101.60.162): icmp_seq=1 ttl=52 time=87.3 ms

Set the IP to this host on my hosts file (Im in centos /etc/hosts/):

151.101.60.162 registry.npmjs.org

I am almost sure it's some glitch in NPM

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related