npm ERR! request to https://registry.npmjs.org/ngx-pagination failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443 - npm-install

While installing any npm package, I am getting the same error every time.
Tried to remove and set proxy but it didn't work.
tabish#appventurez:~/Documents/projects/InstaCEI/InstaCEI_Website$ sudo npm i ngx-pagination --save
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/ngx-pagination failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
npm ERR! A complete log of this run can be found in:
npm ERR! /home/tabish/.npm/_logs/2019-06-19T11_27_35_023Z-debug.log
tabish#appventurez:~/Documents/projects/InstaCEI/InstaCEI_Website$ sudo npm i ngx-pagination --save
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/ngx-pagination failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
npm ERR! A complete log of this run can be found in:
npm ERR! /home/tabish/.npm/_logs/2019-06-19T11_27_35_023Z-debug.log

One reason is about your IP address setup.
Check ip addr, ping, and netplan if ubuntu.
In my example, I setup a static IP of an ubuntu (18.04) VM, but I forgot the DNS.
Then I got the exactly same error as you.
I fix this problem by changing the file /etc/netplan/50-cloud-init.yaml as below:
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
ens33:
addresses: [192.168.233.132/24]
dhcp4: no
gateway4: 192.168.233.2
optional: true
nameservers:
addresses: [223.5.5.5, 8.8.8.8]
version: 2

Related

ERR! errno ETIMEDOUT

While running the following command:
npm install -g #angular/cli
I am getting below exception:
npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! network
request to http://registry.npmjs.org/#angular%2fcli failed, reason:
connect ETIMEDOUT 104.16.16.35: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 was able to resolve my issue referring below:
https://fak3r.com/2015/07/31/howto-use-npm-behind-a-corporate-proxy/
but instead of setting registry value = http://registry.npmjs.org/
I used below, which worked:
proxy=http://Company Proxy:80/
https_proxy=https://Company Proxy:80/
strict-ssl=false
ca=null
registry=https://registry.npmjs.org/

How to fix "npm ERR! network If you are behind a proxy "

I am trying to install npm install --global bower and it throws me an error:
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to http://registry.npmjs.org/bower failed, reason: connect ETIMEDOUT 13.25.26.4:8080
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 timing npm Completed in 147880ms
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\aksha\AppData\Roaming\npm-cache\_logs\2019-06-27T05_03_12_739Z-debug.log
I have run these commands and it solved for me
npm config delete proxy
npm config delete http-proxy
npm config delete https-proxy

I can't install any npm package

I keep getting this error every time I try to install npm package :
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/json-server failed, reason: getaddrinfo ENOTFOUND proxy.company.com proxy.company.com:8181
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! ```
Seems you've misconfigured your proxy infos, here's how to configure it for npm from your cli :
npm config set proxy http://{user}:{password}#{proxy-url}:{proxy-port}
npm config set https-proxy http://{user}:{password}#{proxy-url}:{proxy-port}
and if you're not behind a proxy :
npm config delete proxy
npm config delete https-proxy
hope it can help.

#angular/cli npm install error

I get the following error while I am trying to run npm install #angular/cli.
I have tried changing proxy port no but it does not work.
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to http://registry.npmjs.org/#angular%2fcli failed, reason: connect ETIMEDOUT XXX.XX.X.100:8080
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
network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR!

Unable to install any modules (nodes) in Node-RED on hassio

I am unable to install any modules (nodes) in Node-RED on hassio running on a Raspberry Pi. It worked previously, but does not now. I have not changed any configuration although it is possible that node-red auto updated. When I attempt to install, I get this error:
npm info it worked if it ends with ok
npm info using npm#5.6.0
npm info using node#v10.0.0
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/node-red-contrib-telegrambot-home 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/2018-04-30T01_39_51_895Z-debug.log
There is no proxy. I tried to edit package.json to add the modules to dependencies but that also did not work.
It was a DNS problem. Pi-Hole was also running on the RPi and causing the issue. Set DNS to Google using this info.