How to fix ETIMEDOUT error after npm install? - node.js

This is the error I receive:
I get similar errors in other projects as well after npm install.

First make sure that the server you are trying to access is up. The address is a little sketchy. Ping should do the trick:
$ ping http://bbdr.dcc.com.de:5005
If pinging is successful, make sure that your firewall is not blocking traffic.

If you are behind a proxy, check if $ ping http://bbdr.dcc.com.de:5005 works.
And if you are not behind any proxy, then try below commands -
npm config delete proxy
npm config delete http-proxy
npm config delete https-proxy

Related

npm request failed, reason: connect ETIMEDOUT 104.16.16.35:443

We are trying to get npm to work on a Windows Server 2019.
The server is configured like this:
The server runs as a guest in the ESX VMWare environment.
Server runs behind a checkpoint firewall and a ClearSwift proxy (several antivirus engines active).
An F5 load balancing reverse proxy is run internally in the MSM network via DNS.
Server is running Bitdefender AntiVirus
Server runs with Windows2019 current patch status.
Current firewall settings:
All Denied LAN> Intranet
All Denied Intranet> LAN
We always get this error, no matter what we tried:
This is what we tried so far:
npm config set registry "http://registry.npmjs.org/"
ping proxy
npm config set proxy https-proxy http://proxy.johndoe.corp:8080
npm config set https-proxy http://proxy.johndoe.corp:8080
npm config set strict-ssl false
set HTTPS_PROXY=http://proxy.johndoe.corp:8080
set HTTP_PROXY=http://proxy.johndoe.corp:8080
npm --proxy http://proxy.johndoe.corp:8080 --without-ssl --insecure -g install
npm install --global gulp#3.9.1
We always get the ETIMEDOUT error, and I wasn't able to find the correct solution on the internet.
Any help is appreciated!

npm install module Error: tunneling socket error

I am not able to install nodejs modules using npm on windows. I am behind a proxy and I set the proxy like this:
npm config set proxy internet.cp:8080
npm config set proxy-http internet.cp:8080
When I try to install a packet, i get this error:
npm info retry will retry, error on last attempt: Error: tunneling socket could not be established
I have some questions:
- how can I make npm work with socks5
- can I configure a proxycap file so that npm will use socks5
- other suggestions
It may be happening due to your proxy which is preventing https requests.
Try executing the below command before installing the packets.
npm config set registry http://registry.npmjs.org/
Hope this helps!
It turned out that the proxy I used wasn't the right one. Afeter using the right proxy, and setting it with the commands above, it worked.
npm config set proxy internet.cp:8080
npm config set proxy-http internet.cp:8080

Access watson retrieve and rank behind a proxy in Node

I need to know if the R&R service can be used behind a proxy.
Take a look at the next part to see my investigations.
The code I'm using was working at my home. (No firewall/No Proxy, only a router)
I started from the following code.
https://console.eu-gb.bluemix.net/catalog/starters/personality-insights-nodejs-web-starter
I try to execute it locally and it was working using the following configuration to be able to install the modules.
npm config set registry http://registry.npmjs.org
npm config set proxy http://x.x.x.x:xx
npm config set https-proxy http://x.x.x.x:xx
npm config set strict-ssl false
set http_proxy=http://x.x.x.x:xx
set https_proxy=http://x.x.x.x:xx
set HTTP_PROXY=http://x.x.x.x:xx
set HTTPS_PROXY=http://x.x.x.x:xx
As it was working I started playing around with R&R. But I'm only having an error.
Error searching for documents: Error: connect ETIMEDOUT 158.85.132.88:443
Where the ip address corresponds gateway.watsonplatform.net
ping gateway.watsonplatform.net
PING gateway.watsonplatform.net (158.85.132.88) 56(84) bytes of data.
Because of the firewall the ping are blocked
During my investigations I found that when executing my test for the R&R service every time two ICMP request are send.
Probably because of the firewall. But why this service would need to send ICMP packets ?
Just to recap:
The code is working when there is no firewall/no proxy
The personnality Insight service is working behind proxy/firewall
The R&R isn't
EDIT
After some investigations I've found that there was a bug in the Solr-client so it is currently impossible to make it work.
More info here on this github issue.

installing Ionic Framework in node js

I am getting an error when installing Ionic framework in node js. I am behind a proxy but I already set-up my node config to a proper proxy.
Here is the error message:
error network tunneling socket could not be established, cause=read
ECONNRESET error network This is most likely not a problem with npm
itself error network and is related to network connectivity. error
network In most cases you are behind a proxy or have bad network
settings. error network error network If you are behind a proxy,
please make sure that the error network 'proxy' config is set
properly. See: 'npm help confi
Try installing older version of Node(0.10.38).
Already answere here https://stackoverflow.com/a/31124491/1276616
Try to use this
1) Check if u have a proxy
npm config get proxy
2) If u have, remove them
npm config rm proxy
npm config rm https-proxy
I hope be useful.
Source: How clear proxy npm

set npm proxy without using http:// before the proxy server name

I have npm installed and have used it a few times but unfortunately I had to change my proxy and I am not able to get it to work again.
here are my past settings:(the ones that worked)
npm config get proxy: http://proxy-foo.foobar.com:8080
npm config get https-proxy: http://proxy-foo.foobar.com:8080
now my proxy is a server name and when I use the proxy in my browser it works fine, but when I set the config in npm it fails with 'getaddrinfo ENOTFOUND'
current settings:
npm config get proxy: http://servername:8080
npm config get https-proxy: http://servername:8080
in my browsers proxy I do not use http:// before the server name and I think this is what is causing it to fail. could this be the problem and if so is there a way to set proxy configs in npm without using http:// before.
You're right; npm (more accurately, request, which actually does the fetching) does care about the http:// before the proxy name.
The proxy setting should be a fully-qualified URL that you could visit in a browser, e.g.,
http://proxy.company.com:port/
or
http://1.1.1.1:1234/
if specified as an IP address.

Resources