Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy Settings are passed to pnpm scripts as additional parameters #1121

Open
Mettbrot opened this issue Nov 15, 2023 · 2 comments · May be fixed by #1120
Open

Proxy Settings are passed to pnpm scripts as additional parameters #1121

Mettbrot opened this issue Nov 15, 2023 · 2 comments · May be fixed by #1120

Comments

@Mettbrot
Copy link

Mettbrot commented Nov 15, 2023

Do you want to request a feature or report a bug?
a bug
What is the current behavior?
Proxy parameters to scripts in pnpm are passt to the script, not to pnpm
If the current behavior is a bug, please provide the steps to reproduce.

  • set Proxy settings in maven
  • Run a script with pnpm for example "vue-tsc"
  • Typescript will complain:
[INFO] --- frontend:1.14.2:pnpm (pnpm-run-vue-tsc) @ frontend ---
[INFO] Found proxies: [1{protocol='http', host='proxy.proxy.com', port=8080}]
[INFO] Running 'pnpm vue-tsc --https-proxy=http://proxy.proxy.com:8080'
[INFO] 
[INFO] > vue-tsc "--https-proxy=http://proxy.proxy.com:8080"
[INFO] 
[INFO] error TS5023: Unknown compiler option '--https-proxy=http://proxy.proxy.com:8080'.

What is the expected behavior?
according to the pnpm Website, the additional options need to be passed to pnpm before the script is called. Running

pnpm --https-proxy=http://proxy.proxy.com:8080 vue-tsc

works completely fine.
Please mention your frontend-maven-plugin and operating system version.
frontend-maven-plugin 1.14.2 on Windows 10

@Mettbrot
Copy link
Author

Mettbrot commented Nov 15, 2023

This may be related to #1030
A workaround for this is to disable the proxy to be passed using:

                <configuration>
                  <pnpmInheritsProxyConfigFromMaven>false</pnpmInheritsProxyConfigFromMaven>
                </configuration>

@123Haynes
Copy link

#1120 fixes this issue. unfortunately it's not merged yet.

@123Haynes 123Haynes linked a pull request Nov 17, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants