Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-yarn (install node and yarn) on project wm.ui.frontend : Could not download Yarn: Could not download https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn | Community
Skip to main content
Level 2
September 16, 2024
Solved

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-yarn (install node and yarn) on project wm.ui.frontend : Could not download Yarn: Could not download https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn

  • September 16, 2024
  • 5 replies
  • 2521 views

Hi Team 

getting this error while running the mvn cmd
 mvn -PautoInstallPackage -Padobe-public install -DskipTests

have installed node, yarn, mvn. help on this ASAP.


[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:00 min
[INFO] Finished at: 2024-09-16T08:54:21+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-yarn (install node and yarn) on project wm.ui.frontend
: Could not download Yarn: Could not download https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-v1.22.19.tar.gz: sun.security.validato
r.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path
to requested target -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :wm.ui.frontend





Thanks and Regards
Siva Thanu M S

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Siva_Thanu_M_S

Hi all

Please note, It is resolved by installing the yarn using volta. I was trying to install yarn from cmd prompt using yarn install cmd so due to mismatch version it was getting this error, when I tried to install it yarn again using Volta it got the particular version of yarn installed without any error 

thanks all for the support

5 replies

Rohan_Garg
Community Advisor
Community Advisor
September 16, 2024

Hi @siva_thanu_m_s,
Try the below command once- 

mvn clean install -PautoInstallPackage -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true 


Hope this helps!

 

Level 2
September 16, 2024

Hi @rohan_garg 
Is it ok to do run -Dmaven.wagon.http.ssl.insecure=true, as it  it does not verify the SSL certificate of the server. idea on this.

Rohan_Garg
Community Advisor
Community Advisor
September 17, 2024

Ideally no, but if it works then maybe you will have to import the certificate from the request URL.

For now, I just want to see if it is the certificate issue which is causing the error.

Let me know if this works!

TarunKumar
Community Advisor
Community Advisor
September 16, 2024

HI @siva_thanu_m_s ,


Few things that you can check:

1. Version of "frontend-maven-plugin" use the latest one.

 

 2. Check if npm install" step is available in your pom. This code should be ran before your npm run dev or npm run prod.

   sample:

<plugin> <groupId>com.github.eirslett</groupId> <artifactId>frontend-maven-plugin</artifactId> <version>${frontend-maven-plugin.version}</version> <configuration> <nodeVersion>v12.22.7</nodeVersion> <npmVersion>6.14.0</npmVersion> </configuration> <executions> <execution> <id>install node and npm</id> <goals> <goal>install-node-and-npm</goal> </goals> </execution> <execution> <id>npm install</id> <goals> <goal>npm</goal> </goals> </execution> </executions> </plugin>

 

3. If you are using corp. proxy in maven settings.xml, check if it is set up correctly, maybe the proxy doesn't have an opening to   download from https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-v1.22.19.tar.gz:, try to hit this URL directly and see   if you are able to download.

 Sample proxy configuration would look something like below:

<proxy> <id>xxx-proxy</id> <active>true</active> <protocol>http</protocol> <host>proxy.xxx</host> <port>8080</port> <nonProxyHosts>*.xxx</nonProxyHosts> </proxy>

 

 

-Tarun

 

 

Level 2
September 16, 2024

Hi @tarunkumar 
I m using yarn not npm, in which the yarn is already installed and node everything are in the updated version only. still getting this error help on this.

daniel-strmecki
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 18, 2024

It is difficult to point you to a solution since we are missing a lot of details like Java version, AEM version, source code in question, etc.

A few things I would suggest checking:

  • Are you using the correct Java version for the AEM version you are trying to build?
  • If you are running the build via terminal, check where your JAVA_HOME environment variable points to.
  • If you are running the build via IDE, check which Java version you use to run the program. In IntelliJ check the Project SDK settings.
  • Try to replace the "%JAVA_HOME%/jre/lib/security/cacerts" file with the new one from the freshly installed JRE
  • Use your browser to export the certificate and then use keytool to save the certificate to Java's keystore:

    keytool -trustcacerts -keystore "%JAVA_HOME%jre\lib\security\cacerts" -storepass changeit -importcert -alias <alias_name> -file <path_to_crt_file>

 

Hops this helps, good luck,

Daniel

kautuk_sahni
Community Manager
Community Manager
September 25, 2024

@siva_thanu_m_s Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni
Siva_Thanu_M_SAuthorAccepted solution
Level 2
October 16, 2024

Hi all

Please note, It is resolved by installing the yarn using volta. I was trying to install yarn from cmd prompt using yarn install cmd so due to mismatch version it was getting this error, when I tried to install it yarn again using Volta it got the particular version of yarn installed without any error 

thanks all for the support