El_Loco
El_Loco

Reputation: 1866

npm install takes forever, says I am behind a proxy

I am trying to install different packages using npm 8.19.2. For example yarn

sudo npm install --global yarn

All I get is

npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/yarn failed, reason: connect ETIMEDOUT 2606:4700::6810:1823: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/2022-12-08T20_14_13_653Z-debug-0.log

I have a fresh installation of Ubuntu 22.04. According to this: http://www.amibehindaproxy.com/ I am not behind a proxy. I do not understand why I should be either. In fact, I don't know what it is.

node --version
v18.12.1

My goal is to get started with react. First step is to just run npx create-react-app my-app. But that does not work.

Upvotes: 2

Views: 529

Answers (1)

El_Loco
El_Loco

Reputation: 1866

wget was also slow, then I found this Slow wget speeds when connecting to https pages.

Updating the network settings and disabling IPv6 did the trick.

enter image description here

Upvotes: 2

Related Questions