Git Product home page Git Product logo

Comments (10)

sandorfr avatar sandorfr commented on June 8, 2024 1

I published your PR, let me know how it goes.

from gl-vsts-tasks-yarn.

andersthorsen avatar andersthorsen commented on June 8, 2024 1

It works! Thanks for your help!

For future references: I've defined HTTPS_PROXY and HTTP_PROXY as system variables pointing to http(s)://:port.

This makes yarn work behind a proxy, and with the change done the HTTPS_PROXY variable is now also used successfully by the Yarn installer Task.

from gl-vsts-tasks-yarn.

sandorfr avatar sandorfr commented on June 8, 2024

you need to set environements variables proxy and https-proxy or add a .yarnrc with those values.

see https://github.com/yarnpkg/yarn/blob/master/src/config.js#L341

from gl-vsts-tasks-yarn.

sandorfr avatar sandorfr commented on June 8, 2024

@DalpheSDC did you give it a try?

from gl-vsts-tasks-yarn.

sandorfr avatar sandorfr commented on June 8, 2024

Closing, feel free to reopen if you need.

from gl-vsts-tasks-yarn.

andersthorsen avatar andersthorsen commented on June 8, 2024

Hi!
I hope it's ok to re-open this issue as I'm facing the same problem.

Your response points to yarn itself, but it's actually the yarn installer that fails to download yarn.

I've gotten as far as finding that aparently the node http client which is used by follow-redirects aparently does not honor the standard HTTP_PROXY and HTTPS_PROXY environement variables that I've set in addition to PROXY and HTTPS-PROXY as you suggest above.

Would it be possible to use tl.getHttpProxyConfiguration(); to get the agent's proxy config and then pass that on to the options of the .get method in downloadFile?

from gl-vsts-tasks-yarn.

sandorfr avatar sandorfr commented on June 8, 2024

from gl-vsts-tasks-yarn.

andersthorsen avatar andersthorsen commented on June 8, 2024

I'll see what I can do. The JavaScript changes should be doable, but testing it probably requires me to create a private marketplace deployment so I can test it inside DevOps I guess.

from gl-vsts-tasks-yarn.

sandorfr avatar sandorfr commented on June 8, 2024

@andersthorsen, I removed the dependency to follow redirect which does not support proxiesπŸ˜•. Can you give it a try (use the 3.x preview version)

from gl-vsts-tasks-yarn.

andersthorsen avatar andersthorsen commented on June 8, 2024

Thanks!

Unfortunately I get the same problem, except I get a bit more error messages:
##[debug]isExplicit: null
53##[debug]explicit? false
54##[debug]downloading: https://publicblobs.geeklearning.io/yarn/tarballsV2.json
55##[debug]task result: Failed
56##[error]connect ETIMEDOUT 104.27.154.154:443
57##[debug]Processed: ##vso[task.issue type=error;]connect ETIMEDOUT 104.27.154.154:443
58##[debug]Processed: ##vso[task.complete result=Failed;]connect ETIMEDOUT 104.27.154.154:443

I cloned the repository and reproduced the issue with "yarn test"

I'm creating a pull requests with the changes I needed to be able to run yarn test successfully behind a proxy.

from gl-vsts-tasks-yarn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.