Yarn: Cannot install or update any packages - tunneling socket could not be established

Created on 28 Aug 2018  路  14Comments  路  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?
Report bug

What is the current behavior?
Cannot install or update anything. I am behind a corporate proxy, cannot use npm, and yarn has been working fine until recently.

C:\PIMS_GIT\PIMS.UI>yarn global add @angular/cli@latest
yarn global v1.9.4
info There appears to be trouble with your network connection. Retrying...
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
[2/4] Fetching packages...
warning Pattern ["options@latest"] is trying to unpack in the same destination "C:\Users\username\AppData\Local\Yarn\Cache\v2\npm-options-0.0.6-ec22d312806bb53e731773e7cdaefcf1c643128f" as pattern ["[email protected]"]. This could result in n
on-deterministic behavior, skipping.
[-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0/1123(
node:15696) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/@feathersjs/cli/-/cli-3.7.2.tgz: tunneling socket could not be established, cause=write EPROTO 15524:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:openssl\ssl\rec
ord\ssl3_record.c:252:
".
info If you think this is a bug, please open a bug report with the information provided in "C:\Users\kate.callan\AppData\Local\Yarn\Data\global\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...

If the current behavior is a bug, please provide the steps to reproduce.
yarn add anypackage

What is the expected behavior?
install package

Please mention your node.js, yarn and operating system version.
node.js 10.3.0
yarn 1.9.4
Windows 7
yarn-error.log

triaged

Most helpful comment

it looks like increasing the network timeout helps.

yarn --network-timeout 80000

All 14 comments

almost same issue. yarn repo down?

info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/office-ui-fabric-react/-/office-ui-fabric-react-6.51.0.tgz: ESOCKETTIMEDOUT".

@OneCyrus I also cannot install office-ui-fabric-react through yarn, but on npm it works.

I also cannot install material-design-icons through yarn, but on npm it works.
In this case, the file is downloaded without problems in the browser.

node:13428) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/material-design-icons/-/material-design-icons-3.0.1.tgz: ESOCKETTIMEDOUT".

And a yarn-error.log file:

Arguments: 
  C:\Program Files\nodejs\node.exe C:\Program Files (x86)\Yarn\bin\yarn.js install

PATH: 
  ...other_paths...;
  C:\Program Files (x86)\Yarn\bin;
  C:\Program Files\nodejs;
  C:\Users\Helldar\AppData\Local\Yarn\bin;
  C:\Users\Helldar\AppData\Roaming\npm;

Yarn version: 
  1.9.4

Node version: 
  10.9.0

Platform: 
  win32 x64

Trace: 
  Error: https://registry.yarnpkg.com/material-design-icons/-/material-design-icons-3.0.1.tgz: ESOCKETTIMEDOUT
      at ClientRequest.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:138095:19)
      at Object.onceWrapper (events.js:273:13)
      at ClientRequest.emit (events.js:182:13)
      at TLSSocket.emitRequestTimeout (_http_client.js:661:40)
      at Object.onceWrapper (events.js:273:13)
      at TLSSocket.emit (events.js:182:13)
      at TLSSocket.Socket._onTimeout (net.js:448:8)
      at ontimeout (timers.js:424:11)
      at tryOnTimeout (timers.js:288:5)
      at listOnTimeout (timers.js:251:5)

npm manifest: 
  {
      "private": true,
      "scripts": {
          "dev": "npm run development",
          "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
          "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
          "watch-poll": "npm run watch -- --watch-poll",
          "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
          "prod": "npm run production",
          "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
      },
      "devDependencies": {
          "@fancyapps/fancybox": "^3.3",
          "axios": "^0.18",
          "cross-env": "^5.2",
          "jquery": "^3.3",
          "jquery.scrollto": "^2.1",
          "js-cookie": "^2.2",
          "laravel-mix": "^2.1",
          "lodash": "^4.17",
          "material-design-icons": "^3.0",
          "materialize-css": "^0.100.2",
          "simplebar": "^2.4.4",
          "vue": "^2.5",
          "vue-template-compiler": "^2.5",
          "webpack": "^3.7"
      }
  }

yarn manifest: 
  No manifest

it looks like increasing the network timeout helps.

yarn --network-timeout 80000

Yes, I tried increasing the timeout but it doesn't work for me.

Increase timeout is worked for me.

The timeout worked for me as well!

kalau eror seperti ini kenapa ya ketika mau instal react-JS
yarn create v1.16.0
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/create-react-a
pp: tunneling socket could not be established, statusCode=405".
info If you think this is a bug, please open a bug report with the information p
rovided in "C:\Users\HP\AppData\Local\Yarn\Data\global\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this c
ommand.

@cindyhannyn, use a command yarn install --network-timeout=500000 or yarn upgrade --network-timeout=500000 or yarn add <package_name> --network-timeout=500000 or another command with a --network-timeout=500000 parameter.

kalau eror seperti ini kenapa ya ketika mau instal react-JS
yarn create v1.16.0
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/create-react-a
pp: tunneling socket could not be established, statusCode=405".
info If you think this is a bug, please open a bug report with the information p
rovided in "C:\Users\HP\AppData\Local\Yarn\Data\globalyarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this c
ommand.

I am having a same issue while running command npm init react-app ... Kindly suggest some fix...

the same issue in windows 10 1909

@Akimotorakiyu, use the yarn install --network-timeout=500000 command

yarn add --network-timeout=500000 v1.22.4 does not working

@andrey-helldar thank you.

Was this page helpful?
0 / 5 - 0 ratings