yarn is having troubles with the network connectio

2020-06-12 02:59发布

I tried to install a package with yarn earlier today and I got this

yarn install
yarn install v1.9.4
[1/4]                 

10条回答
Evening l夕情丶
2楼-- · 2020-06-12 03:45

Check your internet speed / strength of connection. I had this problem while I was on a spotty public wifi. Noticed that it was a different package that threw the error each time I tried. And once I got faster / more stable internet this problem went away. (The packages were too large for my poor connection).

查看更多
走好不送
3楼-- · 2020-06-12 03:50

It may be the library was originally using npm instead of yarn. In my case I had to install everything with npm instead of yarn. I removed the yarn.lock file and then:

npm install
查看更多
趁早两清
4楼-- · 2020-06-12 03:50

I had the same network retrying issue when I used yarn install, simply using yarn worked for me.

查看更多
兄弟一词,经得起流年.
5楼-- · 2020-06-12 03:51

I had the same issue and solved by following steps:

Run the terminal command

  1. Clean npm cache
  2. npm cache clean --force
  3. set http_proxy=
  4. Set https_proxy=
  5. Yarn config delete proxy
  6. Npm config rm https-proxy
  7. Npm config rm proxy
  8. Restart your terminal
  9. yarn
  10. Yarn –network-timeout 100000

Restart your terminal.

it worked for me.

查看更多
登录 后发表回答