Document proxy configuration for JS build instead of modifying pom.xml#1479
Closed
Document proxy configuration for JS build instead of modifying pom.xml#1479
Conversation
Change pnpmInheritsProxyConfigFromMaven from false to true in js/pom.xml so that Maven's proxy settings are propagated to pnpm and child processes. This fixes build failures behind TLS-terminating proxies where the kiota-gen package cannot download the Kiota CLI binary from GitHub, resulting in ETIMEDOUT errors during the generate:openapi build step. Co-authored-by: tnorimat <25092005+tnorimat@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix pnpm proxy configuration issue in build process
Enable pnpm to inherit proxy configuration from Maven
Feb 28, 2026
Instead of passing proxy as CLI args via pnpmInheritsProxyConfigFromMaven (which breaks wireit and doesn't help child processes), set NODE_USE_ENV_PROXY=1 environment variable. This leverages Node.js v24.5.0+ built-in support for HTTP_PROXY/HTTPS_PROXY/NO_PROXY env vars, making all Node.js http/https requests (including kiota-gen binary download) go through the proxy when users have standard proxy env vars configured. Co-authored-by: tnorimat <25092005+tnorimat@users.noreply.github.com>
Copilot
AI
changed the title
Enable pnpm to inherit proxy configuration from Maven
Fix proxy configuration for Node.js processes during JS build
Feb 28, 2026
Revert the environmentVariables block from js/pom.xml since shell environment variables are inherited by child processes automatically. Add documentation to docs/building.md explaining how to build behind a proxy using NODE_USE_ENV_PROXY=1 and HTTP_PROXY/HTTPS_PROXY env vars, which is the correct approach for Node.js v24+. Co-authored-by: tnorimat <25092005+tnorimat@users.noreply.github.com>
Copilot
AI
changed the title
Fix proxy configuration for Node.js processes during JS build
Document proxy configuration for JS build instead of modifying pom.xml
Feb 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Building behind a proxy fails during the JS build because Node.js child processes (e.g.,
kiota-gendownloading the Kiota CLI binary) cannot reach external hosts. SettingpnpmInheritsProxyConfigFromMaven=trueis not viable — it appends--proxy/--https-proxyCLI args to all pnpm commands, which wireit rejects as unrecognized arguments.Changes:
js/pom.xmlto its original state — removed the hardcodedNODE_USE_ENV_PROXY=1environmentVariablesblock, since shell env vars are already inherited by Maven's child processes automaticallydocs/building.mdexplaining the correct command-line approachUsage — no pom.xml modification needed:
NODE_USE_ENV_PROXY=1(Node.js v24.5.0+) makes built-inhttp/https/fetch()respectHTTP_PROXY/HTTPS_PROXY. These env vars propagate to all child processes (pnpm → wireit → kiota-gen) without injecting CLI args that break wireit.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.