Giter VIP home page Giter VIP logo

Comments (5)

MartinBenninger avatar MartinBenninger commented on July 26, 2024 1

OK, so I set the http_proxy and https_proxy environment variables and the install worked. 🙌

It might be a good idea to add this info to the docs / error message. Maybe this will help someone in the future.

from dugite.

MartinBenninger avatar MartinBenninger commented on July 26, 2024

I just found this issue desktop/dugite-native#62 where @seriouz seams to have the same problem.

from dugite.

kittaakos avatar kittaakos commented on July 26, 2024

@MartinBenninger, I have just tried it on my Windows 10 image, and it worked for me.

$ mkdir dugite-tmp && cd dugite-tmp && node --version && npm --version && npm init -y && npm i -S dugite
v8.7.0
5.4.2
Wrote to C:\Users\kittaakos\dev\dugite-tmp\package.json:

{
  "name": "dugite-tmp",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}



> [email protected] postinstall C:\Users\kittaakos\dev\dugite-tmp\node_modules\dugite
> node ./script/download-git.js

Downloading Git from: https://github.com/desktop/dugite-native/releases/download/v2.15.0-rc1/dugite-native-v2.15.0-win32-25.tar.gz




npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

+ [email protected]
added 75 packages in 19.187s

from dugite.

MartinBenninger avatar MartinBenninger commented on July 26, 2024

I guess this is a proxy issue then. I am currently behind a corporate proxy but I was at home (no proxy) when I ran it on Linux.

I have configured my proxy with npm and don't have issues downloading or installing other packages. My guess is that the download-git.js script is attempting to download something without using the proxy configuration.

Is there a way that I could configure the proxy for the download script?

from dugite.

shiftkey avatar shiftkey commented on July 26, 2024

If someone wants to refine the error message, this is the code to change:

req.on('error', function (error) {
console.log(`Error raised while downloading ${config.source}`, error)
process.exit(1)
})

To handle the ETIMEDOUT message better you could write something like this:

req.on('error', function (error) {
  if (error.message.code === 'ETIMEDOUT') {
    console.log(`A timeout has occurred while downloading '${config.source}' - check your internet access and try again`, error)
  } else {
    console.log(`Error raised while downloading ${config.source}`, error)
  }

  process.exit(1)
})

from dugite.

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.