OfficeDev / generator-office

Yeoman generator for building Microsoft Office related projects.
https://www.npmjs.com/package/generator-office
MIT License
836 stars 208 forks source link

Running thru a proxy/corp environment #799

Open lrauhockey opened 10 months ago

lrauhockey commented 10 months ago

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

Expected behavior

Please describe the behavior you were expecting In running yo office i am expecting it to create the directories/files needed. Any option can be selected

Current behavior

I am getting errors. Error: connect ETIMEDOUT 20.42.73.142:443 at TCPConnectWrap.afterConnect [as oncomplete] node:net:1300:16] at TCPConnectWrap.callbackTramoline (node:internal/async_hooks:130:17)

it appears that i cannot get thru the proxy and was asked is there is a way to setup a cdnulr properties to add to npmrc

Please provide information about the failure. What is the current behavior? If it is not a bug, please add it to UserVoice, so that it gets added to our feature roadmap.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. npm install -g yo
  2. npm install -g yo generator office
  3. yo office

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Failure Logs

Please include any relevant log snippets, screenshots or code samples here.

Oleg-O commented 2 weeks ago

Are you still seeing those errors or have you been able to resolve this?

pruembeli commented 1 week ago

I have the same/similar issue, client machine is connected via ZScaler Proxy, I created a ".npmrc" file with "proxy", "http-proxy" and "https-proxy" values pointing to the proxy, I used "scrict-ssl=false". NPM is working fine now but "yo office" is failing with:

Unable to download project zip file for "https://github.com/OfficeDev/Office-Addin-TaskPane-React/archive/yo-office.zip". Error: getaddrinfo ENOTFOUND github.com

millerds commented 1 week ago

Are you able to browse https://github.com/OfficeDev/Office-Addin-TaskPane-React in your web browser? The generator-office gets template content from github.com and needs to have access to that side from behind any kind of firewall or proxy.

pruembeli commented 1 week ago

Thanks for the reply, yes I can open the link in the browser because the browser is working with the proxy settings from windows, the page opens but the certificate for github.com was replaced by one from the proxy itself. NPM can be configured with creating a file ".npmrc" in c:\users\myName\ and it is using the proxy as well. How can I set the proxy for "yo office" or is it failing on the certificate?

millerds commented 1 week ago

The generator-office plugin for yeoman uses a js library call "axois" to make the request to get the zip file. From what I can tell online, it honors the http_proxy, https_proxy, and no_proxy environment variables. I have not tried this myself, but it sounds like it should work.

lrauhockey commented 1 week ago

Sorry for the late reply.. But this is still not resolved. I wanted to try, but even though I can download the zip file directly thru a browser, it seems to be blocked.

On Wed, Oct 30, 2024 at 12:00 PM Philipp @.***> wrote:

I have the same/similar issue, client machine is connected via ZScaler Proxy, I created a ".npmrc" file with "proxy", "http-proxy" and "https-proxy" values pointing to the proxy, I used "scrict-ssl=false". NPM is working fine now but "yo office" is failing with:

Unable to download project zip file for " https://github.com/OfficeDev/Office-Addin-TaskPane-React/archive/yo-office.zip". Error: getaddrinfo ENOTFOUND github.com

— Reply to this email directly, view it on GitHub https://github.com/OfficeDev/generator-office/issues/799#issuecomment-2447637816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGBUATDRLDMT4PBGQYOVNETZ6D7CDAVCNFSM6AAAAABQH5OWHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBXGYZTOOBRGY . You are receiving this because you authored the thread.Message ID: @.***>

-- @. @. Larry Gold of course