yarn
yarn copied to clipboard
Proxy is not working but npm works well
Do you want to request a feature or report a bug? bug
What is the current behavior? keep showing There appears to be trouble with your network connection. Retrying..
If the current behavior is a bug, please provide the steps to reproduce. run yarn in root folder
What is the expected behavior? Install packages by package.json
Please mention your node.js, yarn and operating system version. Node v7.3.0 Npm 3.10.10 OS: Windows 7 Yarn: 0.18.1
.yarnrc file
registry "http://registry.npmjs.org/" https-proxy "https://domain%5Cusername:password@host:port" proxy "http://domain%5Cusername:password@host:port"
May I know is there any updates?
@Daniel15 I have the same problem.
Same here! Also doesn't work if the proxy is specified explicitly on the command line via --proxy
, --https-proxy
. This is with v0.18.0.
looks like it should be released in v0.20.0: https://github.com/yarnpkg/yarn/commit/cf07f8e9ff7dd581d378d2a31efad5af8d1c4fb5
Has anybody got this to work?
Still seeing the warning There appears to be trouble with your network connection. Retrying...
in v.0.20.3 using proxy in .yarnrc
file.
Same here. I tried command line options, local .npmrc, local .yarnrc (but not foudn documentation about this) and env var. Nothing worked. Example of tested command:
./node_modules/.bin/yarn install --proxy server:port --https-proxy server:port
./node_modules/.bin/yarn install --proxy http://server:port --https-proxy http://server:port
Reproducible using Yarn 0.24.5 on Windows 7. This is a complete dealbreaker which stops us from using Yarn at all. Anyone have an idea what to do?
@curio77 @ghostd @fengcen @gdipkf1986 are you guys by any chance on Windows as well? Starting to suspect this is an OS specific issue.
Nope, Linux.
FWIW we eventually solved this by not giving yarn any proxy config settings at all, but only using the proxy
and https_proxy
system variables. Works fine, though I have no idea why. They are identical to the corresponding config values we set for yarn.
I am experiencing same issue on yarn version 1.9.2 i've set my yarn config to https-proxy http://localhost:3182 but I am still getting same message
Same problem here, any updates?
+1
have the same issue
Anybody had any luck with this? Also have this issue.
Same issue here. npm operations work fine with our corporate proxy (also using an internal repository). yarn operations fail with:
Error: https://our-internal-repository/api/npm/npm-virtual/some-package: tunneling socket could not be established, statusCode=502
at ClientRequest.onConnect (/usr/local/Cellar/yarn/1.21.1/libexec/lib/cli.js:152140:19)
at Object.onceWrapper (events.js:428:26)
at ClientRequest.emit (events.js:321:20)
at Socket.socketOnData (_http_client.js:509:11)
at Socket.emit (events.js:321:20)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (_stream_readable.js:273:9)
at Socket.Readable.push (_stream_readable.js:214:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
Yarn version 1.21.1.
This prevents teams using yarn in many enterprise environments, I'm surprised this issue has been open for so long without comment.
I'm also having the same issue here - i have tried mutiple things already but the outcome is still the same npm works fine with the proxy settings
but yarn always gives me the same output
e.g.
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 Couldn't find package "@babel/helper-validator-identifier@^7.15.7" required by "@babel/highlight@^7.16.0" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Couldn't find package "@babel/helper-split-export-declaration@^7.16.0" required by "@babel/helper-module-transforms@^7.16.0" on the "npm" registry.
at MessageError.ExtendableBuiltin (/usr/local/lib/node_modules/yarn/lib/cli.js:243:66)
at new MessageError (/usr/local/lib/node_modules/yarn/lib/cli.js:272:123)
at PackageRequest.<anonymous> (/usr/local/lib/node_modules/yarn/lib/cli.js:38988:17)
at Generator.throw (<anonymous>)
at step (/usr/local/lib/node_modules/yarn/lib/cli.js:92:30)
at /usr/local/lib/node_modules/yarn/lib/cli.js:105:13
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
using cntlm
yarn config set https-proxy http://localhost:3128
yarn config set http-proxy http://localhost:3128
yarn config set strict-ssl false
it really is annoying because some projects rely heavily on yarn and cannot be used without it. hopefully there is somebody how can support on this issue
I am also using cntlm, what worked for me with yarn 4.1.1 is
yarn config set httpProxy http://localhost:3128
yarn config set httpsProxy http://localhost:3128