satyanarayan mishra
satyanarayan mishra

Reputation: 109

Error with npm install : getaddrinfo ENOTFOUND hostname-entry-in-hosts-file at GetAddrInfoReqWrap.onlookup

I am facing an issue with npm start

Error: getaddrinfo ENOTFOUND prizm-new-luke.pearson.com     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26) {   errno: -3008,   code: 'ENOTFOUND',   syscall: 'getaddrinfo',   hostname: 'prizm-new-luke.pearson.com' }

Tried all options like below

============================================

If python2 command not found 

Check what python is installed

which python

which python2

which python3

Then try:-

brew install pyenv 

pyenv install 2.7.18 

pyenv global  2.7.18  

 

After this python2 —version and python3 —version both give results.

Then try

npm install --python=/Users/VBOSESA/.pyenv/shims/python2 -f -verbose

open ~/.zshrc    

Add in the file alias python=“~/usr/bin/python3”

source ~/.zshrc 

============================================

npm cache clean

Hosts file update

sudo nano /private/etc/hosts

vim /private/etc/hosts

npm config deleteproxy
npm config deletehttp-proxy
npm config deletehttps-proxy

But no solution

Upvotes: 0

Views: 263

Answers (1)

satyanarayan mishra
satyanarayan mishra

Reputation: 109

In MAC

Open terminal in admin capabilities su - Admin_UserName Admin_Password   From the same terminal Open hosts file to add the entries sudo nano /private/etc/hosts   When I logged in as admin, then only I could see that the hosts file was corrupted

Then cleared of the clutter and everything worked like charm.  

Upvotes: 0

Related Questions