Expand my Community achievements bar.

SOLVED

Getting download npm failure: while doing mvn clean install to build and deploy wknd project into local AEM instance

Avatar

Level 2


[INFO] --- frontend-maven-plugin:1.11.3:install-node-and-npm (install node and npm) @ aem-guides-wknd.ui.frontend ---
[INFO] Node v16.17.0 is already installed.
[INFO] Installing npm version 8.15.0
[INFO] Downloading https://registry.npmjs.org/npm/-/npm-8.15.0.tgz to C:\Users\ranilrao\.m2\repository\com\github\eirslett\npm\8.15.0\npm-8.15.0.tar.gz
[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for WKND Sites Project - Reactor Project 2.1.3-SNAPSHOT:
[INFO]
[INFO] WKND Sites Project - Reactor Project ............... SUCCESS [ 1.645 s]
[INFO] WKND Sites Project - Core .......................... SUCCESS [ 15.272 s]
[INFO] WKND Sites Project - UI Frontend ................... FAILURE [ 2.189 s]
[INFO] WKND Sites Project - UI apps structure ............. SKIPPED
[INFO] WKND Sites Project - UI apps ....................... SKIPPED
[INFO] WKND Sites Project - UI content .................... SKIPPED
[INFO] WKND Sites Project - UI config ..................... SKIPPED
[INFO] WKND Sites Project - UI sample content ............. SKIPPED
[INFO] WKND Sites Project - All ........................... SKIPPED
[INFO] WKND Sites Project - UI Tests ...................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.243 s
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.243 s
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.243 s
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.243 s
[INFO] Finished at: 2022-12-02T19:19:54+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.3:install-node-and-npm (install node and npm) on project aem-guides-wknd.ui.frontend: Could not download npm: Could not download https://registry.npmjs.org/npm/-/npm-8.15.0.tgz: PKIX path building failed:sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi @rajesh_didshe

This is may be issue with the MAC M1 chip issue which does not support older frontend plugin.

Please refer the similar thread which solved the issue.

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/m1-mac-cant-build-wknd-tut...

View solution in original post

9 Replies

Avatar

Correct answer by
Level 5

Hi @rajesh_didshe

This is may be issue with the MAC M1 chip issue which does not support older frontend plugin.

Please refer the similar thread which solved the issue.

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/m1-mac-cant-build-wknd-tut...

Avatar

Level 2

Hi @VeenaK,

Thanks for replay, but I'm not MAC user. Here It is showing unable to find valid certification path to requested target for downloading npm. for reference you can check above attach error note.

Avatar

Community Advisor

Hello @rajesh_didshe ,

 

For me I have noticed that for OKIX issue it has been certificate issue. Adding the cacert for the domain from which the download is attempted, to the java jre cacerts file has helped.

 

Please see if this is the case.

 

Sample steps for installing the cacerts - https://www.ibm.com/docs/en/tnpm/1.4.2?topic=security-import-certificate-jre-keystore

 

Thanks

Avatar

Level 2

Hi @Shubham_borole ,

Above WKND project is java 11 base and JRE no longer offered in JDK 11 Version, so not able to add cacerts.

Thanks,

Avatar

Community Advisor

Hi @rajesh_didshe , we are doing same for java 11 where the cacerts is located at "C:\Program Files\Java\jdk-11.0.11\lib\security" for example, basically the cacerts file is under '/libs/security' folder in case you are using mac you may need to find the equivalent.

Probably your issue is already resolved if its a mac. Just wanted to add the info. Thanks for responding.

Avatar

Level 2

Hi @Shubham_borole,

After hitting Keytool command getting FileNotFoundException for c:\temp\mdeCert.cer, any cue on this.

 

Thanks

Avatar

Level 2

Hi @Shubham_borole,

Also tried cmd with admin elevated rights and attched screenshot for ref. Thanks for replay

rajesh_didshe_0-1670390874364.png

 

 

Avatar

Level 2

Resolution:

 

Issue arises due to missing SSL certificate in the Java 11 keychain located in your Java11 jdk. Update the keychain with the certificate details will fix this issue.

  1. Locate your JDK11 security folder: Mine is:  C:\Programs\java11\jdk-11.0.17\lib\security
  2. Place the attached certificate in the location you prefer
  3. Execute the following command from this jdk directory: keytool -import -trustcacerts -file C:\<<your location>>\_.nodejs.org.crt -keystore cacerts
    1. Keystore password : changeit
    2. Trust this certificate: yes
  4. The certificate will be added to the key chain which will resolve the mentioned issue, try building the code again after the above steps.