{"action":"reopened","issue":{"url":"https://api.github.com/repos/sass/node-sass/issues/1458","repository_url":"https://api.github.com/repos/sass/node-sass","labels_url":"https://api.github.com/repos/sass/node-sass/issues/1458/labels{/name}","comments_url":"https://api.github.com/repos/sass/node-sass/issues/1458/comments","events_url":"https://api.github.com/repos/sass/node-sass/issues/1458/events","html_url":"https://github.com/sass/node-sass/issues/1458","id":150021876,"number":1458,"title":"Post Install fails inside a proxy","user":{"login":"toninofox","id":8643889,"avatar_url":"https://avatars.githubusercontent.com/u/8643889?v=3","gravatar_id":"","url":"https://api.github.com/users/toninofox","html_url":"https://github.com/toninofox","followers_url":"https://api.github.com/users/toninofox/followers","following_url":"https://api.github.com/users/toninofox/following{/other_user}","gists_url":"https://api.github.com/users/toninofox/gists{/gist_id}","starred_url":"https://api.github.com/users/toninofox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toninofox/subscriptions","organizations_url":"https://api.github.com/users/toninofox/orgs","repos_url":"https://api.github.com/users/toninofox/repos","events_url":"https://api.github.com/users/toninofox/events{/privacy}","received_events_url":"https://api.github.com/users/toninofox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2016-04-21T09:43:17Z","updated_at":"2016-04-21T12:11:35Z","closed_at":null,"body":"Dear all, \r\nI am trying to install node-sass inside a proxy properly configured in node npm via \r\n`npm config set proxy http://myproxy.com:8080`\r\n\r\nall dependencies works but the post install of node-sass fails\r\n\r\n ```\r\nnpm info lifecycle node-sass@3.5.1~install: node-sass@3.5.1\r\n \r\n  node-sass@3.5.1 install D:\\...\\node_modules\\node-sass\r\n  node scripts/install.js\r\n \r\n Cannot download \"https://github.com/sass/node-sass/releases/download/v3.5.1/win32-ia32-47_binding.node\": \r\n \r\n getaddrinfo ENOTFOUND github.com github.com:443\r\n \r\n Hint: If github.com is not accessible in your location\r\n       try setting a proxy via HTTP_PROXY, e.g. \r\n    export HTTP_PROXY=http://example.com:1234\r\n \r\n or configure npm proxy via\r\nnpm config set proxy http://example.com:8080\r\n\r\n\r\n```\r\n\r\nIn the install.js script of the node-sass module, there is the proxy configuration reported below:\r\n\r\n```\r\nfunction applyProxy(options, cb) {\r\n  var env = process.env;\r\n\r\n  options.proxy = env.npm_config_https_proxy ||\r\n                  env.npm_config_proxy ||\r\n                  env.npm_config_http_proxy ||\r\n                  env.HTTPS_PROXY ||\r\n                  env.https_proxy ||\r\n                  env.HTTP_PROXY ||\r\n                  env.http_proxy;\r\n\r\n  cb(options);\r\n}\r\n```\r\n\r\nthe older versions (that work inside the proxy) are configured with the function as below\r\n\r\n```\r\nfunction applyProxy(options, cb) {\r\n  npmconf.load({}, function (er, conf) {\r\n    var proxyUrl;\r\n\r\n    if (!er) {\r\n      proxyUrl = conf.get('https-proxy') ||\r\n                 conf.get('proxy') ||\r\n                 conf.get('http-proxy');\r\n    }\r\n\r\n    var env = process.env;\r\n\r\n    options.proxy = proxyUrl ||\r\n                    env.HTTPS_PROXY ||\r\n                    env.https_proxy ||\r\n                    env.HTTP_PROXY ||\r\n                    env.http_proxy;\r\n\r\n    cb(options);\r\n  });\r\n}\r\n```\r\n\r\n\r\nThank You!"}}