How to resolve BUILD_NPM_AUDIT_ERROR in AEM as a Cloud Service front-end pipeline
The front-end pipeline’s first execution fails with an internal error. Delete two nodes in your Adobe Experience Manager project code, as outlined in the documentation provided in this article.
Description description
Environment
Adobe Experience Manager as a Cloud Service (AEMaaCS)
Issue/Symptoms
The first execution of the front-end pipeline fails with an internal error.
Error message:
Cloud Manager an internal error during the fast front-end pipeline deployment. If this recurs, please encounter Adobe Support.
There is a BUILD_NPM_AUDIT_ERROR in build.log.
build.log:
01:23:34.567 [ main] INFO c.a.p.e.s.b.s.CommandLineServiceImpl - Executing command npm --progress false audit --production --audit-level=critical
01:23:34.567 [ main] INFO c.a.p.e.s.b.s.CommandLineServiceImpl - Running: [ npm, --progress, false, audit, --production, --audit-level=critical]
npm ERR! Cannot read property 'jquery' of undefined
npm ERR! A complete log of this run can be found in:npm ERR! /root/.npm/_logs/1234-56-78T91_23_45_678Z-debug.log01:23:34.567 [ main] DEBUG c.a.p.e.s.b.s.w.AbstractBuildWorkflowService - Storing the default errorCode BUILD_NPM_AUDIT_ERROR for step build on repo <site-name>01:23:34.567 [ main] INFO c.a.p.e.s.b.s.w.NpmBuildWorkflowService - Build and scan pipeline interrupted due to IOException!org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
This article explains how to resolve this issue.
Resolution resolution
Delete the following two nodes in your AEM project code as described in the documentation[ 1] :
- /conf/
<site-name>/sling:configs/com.adobe.aem.wcm.site.manager.config.SiteConfig - /conf/
<site-name>/sling:configs/com.adobe.cq.wcm.core.components.config.HtmlPageItemsConfig
The front-end pipeline updates the SiteConfig node with the package name of the deployed theme, but it will fail if the package name and SiteConfig settings are different.
The details are as follows:
Step 1. Check the .content.xml file at the following path:
/ui.content/src/main/content/jcr_root/conf/appId/_sling_configs/
Step 2. Delete the two node definitions:
SiteConfig:
<com.adobe.aem.wcm.site.manager.config.SiteConfig
jcr:primaryType="nt:unstructured"
siteTemplatePath="/libs/wcm/core/site-templates/aem-site-template-stub-2.0.0"
themePackageName="${appId}"/>
HtmlPageItemsConfig:
<com.adobe.cq.wcm.core.components.config.HtmlPageItemsConfig
jcr:primaryType="cq:Page">
・・・
</com.adobe.cq.wcm.core.components.config.HtmlPageItemsConfig>
Step 3. Rerun the front-end pipeline in Cloud Manager.
As a result of step 3, AEM will properly recreate these configuration nodes. The pipeline should succeed afterward.
[ 1] Enabling the Front-End Pipeline
For more details, follow this link Enabling the Front-end Pipeline