I am trying to do a build using frontend-maven-plugin
but every time it tries to fetch packages I fails with a 502 Bad Gateway
. I saw that it is trying to reach out to npmjs
hence I tried changing the registry URL to /
. But still get the same error. And I do see it still trying to fetch the packages from npmjs
.
Here is my current plugin configuration:
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${eirslett.version}</version>
<configuration>
<yarnVersion>${yarn.version}</yarnVersion>
<nodeVersion>${node.version}</nodeVersion>
</configuration>
<executions>
<execution>
<id>install node and yarn</id>
<goals>
<goal>install-node-and-yarn</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
</configuration>
</execution>
<execution>
<id>yarn version</id>
<goals>
<goal>yarn</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
<arguments>--version</arguments>
</configuration>
</execution>
<execution>
<id>yarn strict false set</id>
<goals>
<goal>yarn</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>config set strict-ssl false</arguments>
<environmentVariables>
<CYPRESS_INSTALL_BINARY>0</CYPRESS_INSTALL_BINARY>
</environmentVariables>
</configuration>
</execution>
<execution>
<id>yarn node-gyp</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>global add node-gyp --ignore-engines</arguments>
<environmentVariables>
<CYPRESS_INSTALL_BINARY>0</CYPRESS_INSTALL_BINARY>
</environmentVariables>
</configuration>
</execution>
<execution>
<id>yarn install</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>install --registry=/ --ignore-engines</arguments>
<environmentVariables>
<yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
<CYPRESS_INSTALL_BINARY>0</CYPRESS_INSTALL_BINARY>
</environmentVariables>
</configuration>
</execution>
<execution>
<id>yarn run</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
<arguments>run ${NPM_CMD}</arguments>
</configuration>
</execution>
</executions>
</plugin>
And the error I get on the yarn install
ID is:
[INFO] --- frontend:1.12.0:yarn (yarn install) @ vod-webpack-master ---
[INFO] Found proxies: [http{protocol='http', host='a_corporate_proxy', port=8888, nonProxyHosts='localhost|127.0.0.1'}, https{protocol='https', host='a_corporate_proxy', port=8888, nonProxyHosts='localhost|127.0.0.1'}]
[INFO] Running 'yarn install --registry=/ --ignore-engines --https-proxy=http://a_corporate_proxy:8888 --proxy=http://a_corporate_proxy:8888' in /home/node/az-net/workspace/com.gtt.vod/26377-vod-vod-verify/vod-webpack-master
[INFO] yarn install v1.22.10
[INFO] [1/4] Resolving packages...
[INFO] warning [email protected]: Node Sass is no longer supported. Please use `sass` or `sass-embedded` instead.
[INFO] warning node-sass > node-gyp > [email protected]: request has been deprecated, see
[INFO] [2/4] Fetching packages...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] error An unexpected error occurred: ".4.0.tgz: Request failed \"502 Bad Gateway\"".
[INFO] info If you think this is a bug, please open a bug report with the information provided in "/home/node/az-net/workspace/com.gtt.vod/26377-vod-vod-verify/vod-webpack-master/yarn-error.log".
[INFO] info Visit for documentation about this command.
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
[INFO] info There appears to be trouble with your network connection. Retrying...
.
.
.
.
.
.
[INFO] [jenkins-event-spy] Generated /home/node/az-net/workspace/com.gtt.vod/26377-vod-vod-verify@tmp/withMavenefaeb475/maven-spy-20250324-143752-43416337656276213668641.log
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.0:yarn (yarn install) on project vod-webpack-master: Failed to run task: 'yarn install --registry=/ --ignore-engines --https-proxy=http://a_corporate_proxy:8888 --proxy=http://a_corporate_proxy:8888' failed. .apachemons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
I see that changing the registry didn't work. It is still trying to reach out to npmjs
.
The version for NodeJS and Yarn are 16.14.0 and 1.22.10 respectively.
Any help would be appreciated. Thanks
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744239650a4564642.html
评论列表(0条)