Expand my Community achievements bar.

SOLVED

maven build error - ui.frontend - com.github.eirslett:frontend-maven-plugin

Avatar

Level 1

hi all,

 

we are getting the below build error in a project for ui.frontend module - 

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.15.0:npm (npm install) on project wknd-foundation.ui.frontend: Failed to run task: 'npm install' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 128 (Exit value: 128) -> [Help 1]

INFO] npm ERR! code 128
[INFO] npm ERR! An unknown git error occurred
[INFO] npm ERR! command git --no-replace-objects ls-remote https://tkumar11-wknd-com:***@git.cloudmanager.adobe.com/wknd/aem-cs-centralized-package-dev-file
[INFO] npm ERR! fatal: unable to access 'https://git.cloudmanager.adobe.com/wknd/aem-cs-centralized-package-dev-file/': SSL certificate problem: unable to get local issuer certificate
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.15.0:npm (npm install) on project wknd-foundation.ui.frontend: Failed to run task: 'npm install' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 128 (Exit value: 128) -> [Help 1]

 

Node version - 18.20.3

Npm version - 10.7.0

 

Running npm install on frontend module gives below error -

C:\wknd\aem-foundation\ui.frontend>npm install
npm error code ETARGET
npm error notarget No matching version found for @Nucleus/vue@5.18.1.
npm error notarget In most cases you or one of your dependencies are requesting
npm error notarget a package version that doesn't exist.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

For Issue 1, you might want to disable the ssl - you can try building only the ui.frontend module after configuring via "git config --global http.sslVerify false"

This will disable SSL certificate checking for the repo.

 

 

View solution in original post

3 Replies

Avatar

Level 2

The error message indicates an SSL certificate problem while accessing a Git repository. Specifically, the error is related to the npm install command, which is trying to fetch dependencies from a Git repository, but it cannot verify the SSL certificate.
For many companies, some firewalls need an installed SSL certificates to install the dependencies in the run time.

Here are some steps to troubleshoot and resolve this issue:

1. Check SSL Certificates

Make sure the SSL certificates are properly configured on the machine running the build. This includes updating the CA certificates.

On Unix-based systems:

sudo apt-get update sudo apt-get install ca-certificates sudo update-ca-certificates

On macOS:

brew install ca-certificates brew update-ca-certificates

2. Configure Git to Ignore SSL Verification

If you're in a controlled environment and sure about the repository's authenticity, you can temporarily disable SSL verification for Git. However, this is not recommended for production environments due to security risks. Most probably you won't even have permission to do it.

git config --global http.sslVerify false

3. Update frontend-maven-plugin Version

Ensure you are using the latest version of the frontend-maven-plugin. There might be bug fixes or improvements that could resolve your issue.

In your pom.xml:

<plugin> <groupId>com.github.eirslett</groupId> <artifactId>frontend-maven-plugin</artifactId> <version>1.15.0</version> <!-- Check for the latest version --> <!-- Configuration here --> </plugin>

4. Check Repository URL and Authentication

Ensure that the repository URL and the credentials provided are correct. Verify that the username and token (or password) are correct and have the required permissions to access the repository.

5. Use Custom CA Certificates in Node.js

If you need to add custom CA certificates to Node.js, you can configure it by setting the NODE_EXTRA_CA_CERTS environment variable.

sh
Copy code
export NODE_EXTRA_CA_CERTS=/path/to/your/certfile.crt

7. Network Configuration

Check your network settings to ensure there are no proxies or firewalls blocking the connection to the Git repository. Configure your .npmrc file if you are behind a corporate proxy.

In your .npmrc file:


proxy=http://proxy-server:port https-proxy=http://proxy-server:port

Most probabbly this can be the case

8. Visit the npm/node download website

Download the certificates through "visit site information" and install them on your PC manually.

8. Retry the Build

After applying every step, retry running your Maven build.

 

By following these steps, you should be able to resolve the SSL certificate issue and successfully execute the npm install command during your build process.

 

Avatar

Level 4

Hi @Naga_Krishna_MohanTu 

It looks like you're experiencing two separate issues.

Issue 1: SSL certificate problem

The first error message indicates a problem with the SSL certificate when trying to access a Git repository. This is likely due to a missing or invalid certificate in your system's truststore.

To resolve this, you can try the following:

  1. Check your system's truststore and ensure that the certificate for git.cloudmanager.adobe.com is present and valid.
  2. If you're using a proxy, ensure that it's configured correctly and not interfering with the Git connection.
  3. Try setting the GIT_SSL_NO_VERIFY environment variable to true before running the Maven build. This will disable SSL verification for Git, but be aware that this reduces security.

Issue 2: npm install error (ETARGET)

The second error message indicates that npm can't find a matching version for the @Nucleus/vue package.

To resolve this, you can try the following:

  1. Check the package.json file in your ui.frontend module to ensure that the version specified for @Nucleus/vue is correct and exists in the npm registry.
  2. Run npm install --legacy-peer-deps to install the dependencies with legacy peer dependencies.
  3. If you're using a private npm registry, ensure that it's correctly configured and accessible.
  4. Try deleting the node_modules directory and running npm install again to reinstall the dependencies.

Additionally, you can try updating the frontend-maven-plugin to a newer version, as the current version (1.15.0) might be outdated.

If none of these solutions work, please provide more details about your project setup, and I'll be happy to help you troubleshoot further!

Avatar

Correct answer by
Community Advisor

For Issue 1, you might want to disable the ssl - you can try building only the ui.frontend module after configuring via "git config --global http.sslVerify false"

This will disable SSL certificate checking for the repo.