Like below image, I face the error
" Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.0:install-node-and-npm (install node and npm) on project practice.ui.frontend: Could not download npm: Could not download https://registry.npmjs.org/npm/-/npm-10.7.0.tgz: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]"
I check many articles but it won't help.
node -v : v20.15.0
npm -v: 10.7.0
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Jedy12
Can you try if temporarily disabling SSL verification (not recommended for production) works for you. You can try bypassing SSL verification this way:
mvn clean install -PautoInstallPackage -Dmaven.wagon.http.ssl.insecure=true
npm jar is available in the URL,
It seems to be an issue with Firewall. If possible, please stop Zscaler or similar app for a while. Reach out to your IT department, they should be able to help
Hi @Jedy12
Can you try if temporarily disabling SSL verification (not recommended for production) works for you. You can try bypassing SSL verification this way:
mvn clean install -PautoInstallPackage -Dmaven.wagon.http.ssl.insecure=true
It works well, I really appreciate it.
Hi @Jedy12
The error you're facing is related to the frontend-maven-plugin failing to download Node.js and npm due to a certificate validation issue.
This issue is often caused by the Maven build process not trusting the SSL certificate of the npm registry. Here are a few potential solutions to help you resolve this issue:
1. Disable SSL certificate validation
You can try disabling SSL certificate validation for the Maven build process by adding the following configuration to your pom.xml file:
This will skip certificate verification, but keep in mind that this is not recommended for production environments as it reduces security.
2. Add the npm registry certificate to the Java truststore
You can add the npm registry certificate to the Java truststore using the following command:
You'll need to download the npm-registry.crt file from the npm registry website or use a tool like OpenSSL to extract the certificate from the website.
3. Use a Maven settings file with a custom certificate
Create a settings.xml file in your Maven configuration directory (usually ~/.m2/) with the following content:
Then, update your pom.xml file to reference this settings file:
Try one of these solutions and see if it resolves the issue for you. If you're still facing problems, please provide more details about your environment and setup.
This happens when the corporate network is replacing all SSL certificates with their own. These certs are not trusted by default.
As a workaround, run mvn clean package -U -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
Thank you.
I followed your guide, it worked very well.
Thank you again.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies