Comment résoudre BUILD_NPM_AUDIT_ERROR dans le pipeline frontal AEM as a Cloud Service
La première exécution du pipeline front-end échoue avec une erreur interne. Supprimez deux noeuds dans le code de votre projet Adobe Experience Manager, comme indiqué dans la documentation fournie dans cet article.
Description description
Environnement
Adobe Experience Manager as a Cloud Service (AEMaaCS)
Problème/Symptômes
La première exécution du pipeline front-end échoue avec une erreur interne.
Message d’erreur :
Cloud Manager an internal error during the fast front-end pipeline deployment. If this recurs, please encounter Adobe Support.
Il existe un BUILD_NPM_AUDIT_ERROR dans 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)
Cet article explique comment résoudre ce problème.
Résolution resolution
Supprimez les deux noeuds suivants dans votre code de projet AEM, comme décrit dans la documentation [
1]
:
- /conf/
<
nom-site>
/sling:configs/com.adobe.aem.wcm.site.manager.config.SiteConfig - /conf/
<
nom-site>
/sling:configs/com.adobe.cq.wcm.core.components.config.HtmlPageItemsConfig
Le pipeline frontal met à jour le noeud SiteConfig avec le nom du module du thème déployé, mais il échoue si le nom du module et les paramètres SiteConfig sont différents.
Les détails sont les suivants :
Étape 1. Vérifiez le fichier .content.xml à l’emplacement suivant :
/ui.content/src/main/content/jcr_root/conf/appId/_sling_configs/
Étape 2. Supprimez les deux définitions de noeud :
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>
Étape 3. Réexécutez le pipeline front-end dans Cloud Manager.
À la suite de l’étape 3, AEM recréera correctement ces noeuds de configuration. Le pipeline doit réussir par la suite.
[
1]
Activation du pipeline front-end
Pour plus d’informations, suivez ce lien Activation du pipeline front-end