question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

yarn 1.0 arguments support (proxy)

See original GitHub issue

I try to build a jHipster-based app with updated libs. maven runs yarn run webpack:prod --https-proxy=http://proxy:8080 --proxy=http://proxy:8080

ok until yarn.version<=0.28.4

but if yarn >=1.0, then it failed with warning.

warning From Yarn 1.0 onwards, scripts don’t require “–” for options to be forwarded. In a future version, any explicit “–” will be forwarded as-is to the scripts.

If should be: yarn run webpack:prod https-proxy=http://proxy:8080 proxy=http://proxy:8080

then it works. But frontend-maven-plugin should be updated here for this. thanks.

frontend-maven-plugin v1.6 os windows 10

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ena1106commented, Nov 23, 2017

As a workaround there is the flag: <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>

With this flag set the wrong params are not passed from the plugin and yarn will use the proxy settings configured in the local machine. I think it could be possible also to set the parameters manually in the execution arguments.

Something like: <execution> <id>yarn install</id> <goals> <goal>yarn</goal> </goals> <configuration> <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven> <arguments>install ----https-proxy=http://proxy:8080 --proxy=http://proxy:8080</arguments> </configuration> </execution>

and

<execution> <id>webpack build prod</id> <goals> <goal>yarn</goal> </goals> <phase>generate-resources</phase> <configuration> <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven> <arguments>run --https-proxy=http://proxy:8080 --proxy=http://proxy:8080 webpack:prod</arguments> </configuration> </execution>

1reaction
lmbaicommented, Jan 10, 2018

@dg-grow-virgiliu-ratoi pass the config parameters in the pom.xml file will solve this <configuration> <arguments>run webpack:build</arguments>

  •                                <%_ if (clientPackageManager === 'yarn') { _%>
    
  •                                    <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
    
  •                                <%_ } else if (clientPackageManager === 'npm') { _%>
    
  •                                    <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
    
  •                            </configuration>
    
Read more comments on GitHub >

github_iconTop Results From Across the Web

httpp-proxy | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
5.14. Running YARN Behind a Proxy Server
5.14 Running YARN Behind a Proxy Server. Configuring proxy for yarn. In order that yarn still works behind a proxy server, you need...
Read more >
Apache Hadoop 3.3.4 – NodeManager
Auxiliary Service Classpath Isolation ... yarn.nodemanager.disk-health-checker.interval-ms ... Mandatory argument for each script.
Read more >
When specified, "proxy" in package.json must be a string
First, install http-proxy-middleware using npm or Yarn: ... This feature is still supported and has the same behavior.
Read more >
proxyfull - npm
ECMAScript 2015 Proxy with deep property path return and logging. Latest version: 1.0.0, last published: 6 years ago.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found