npm安装需要很长时间,说我在代理后面

qmelpv7a  于 2022-12-13  发布在  其他
关注(0)|答案(1)|浏览(225)

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.

piok6c0g

piok6c0g1#

wget也很慢,然后我发现了这个Slow wget speeds when connecting to https pages
更新网络设置并禁用IPv6就解决了这个问题。

相关问题