Getting download npm failure: while doing mvn clean install to build and deploy wknd project into local AEM instance | Adobe Higher Education
Skip to main content
Level 2
December 2, 2022
解決済み

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

  • December 2, 2022
  • 3 の返信
  • 4306 ビュー


[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

このトピックへの返信は締め切られました。
ベストアンサー VeenaK

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-tutorial-get-quot-could-not-download-node/m-p/399462

3 の返信

VeenaK回答
Level 4
December 2, 2022

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-tutorial-get-quot-could-not-download-node/m-p/399462

rajesh_didshe作成者
Level 2
December 3, 2022

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.

Shubham_borole
Community Advisor
Community Advisor
December 4, 2022

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

rajesh_didshe作成者
Level 2
December 5, 2022

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,

Shubham_borole
Community Advisor
Community Advisor
December 5, 2022

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.

arjunsudhas1995
Level 2
March 13, 2023

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.