Reputation: 3703
I have an error installing any package, even if I run sudo npm i -g npm
I get the same error:
npm ERR! Linux 4.15.0-1032-aws
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i" "-g" "npm"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! syscall connect
npm ERR! network connect ETIMEDOUT 104.16.16.35:443
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is 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 know where to start for debugging, I thought I have a problem with my internet but I can ping google.com from my EC2 Instance, even when I ping 104.16.16.35
I get response packets.
Curl response for curl -I 104.16.27.35:443
curl: (7) Failed to connect to 104.16.27.35 port 443: Connection timed out
Upvotes: 1
Views: 1193
Reputation: 886
npm
downloads the packages it will install via https
, so you should add port 443
to the outbound rules in your security group configuration.
Upvotes: 1