Come risolvere BUILD_NPM_AUDIT_ERROR nella pipeline front-end di AEM as a Cloud Service
La prima esecuzione della pipeline front-end non riesce e viene generato un errore interno. Elimina due nodi nel codice del progetto Adobe Experience Manager, come descritto nella documentazione fornita in questo articolo.
Descrizione description
Ambiente
Adobe Experience Manager as a Cloud Service (AEMaaCS)
Problema/Sintomi
La prima esecuzione della pipeline front-end non riesce e viene generato un errore interno.
Messaggio di errore:
Cloud Manager an internal error during the fast front-end pipeline deployment. If this recurs, please encounter Adobe Support.
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)
Questo articolo spiega come risolvere questo problema.
Risoluzione resolution
Eliminare i due nodi seguenti nel codice del progetto AEM come descritto nella documentazione[ 1]:
- /conf/
<nome-sito>/sling:configs/com.adobe.aem.wcm.site.manager.config.SiteConfig - /conf/
<nome-sito>/sling:configs/com.adobe.cq.wcm.core.components.config.HtmlPageItemsConfig
La pipeline front-end aggiorna il nodo SiteConfig con il nome del pacchetto del tema distribuito, ma non riesce se il nome del pacchetto e le impostazioni SiteConfig sono diversi.
I dettagli sono i seguenti:
Passaggio 1: Controllare il file .content.xml nel percorso seguente:
/ui.content/src/main/content/jcr_root/conf/appId/_sling_configs/
Passaggio 2: Elimina le definizioni dei due nodi:
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>
Passaggio 3: Esegui nuovamente la pipeline front-end in Cloud Manager.
In seguito al passaggio 3, AEM ricreerà correttamente questi nodi di configurazione. La pipeline dovrebbe avere esito positivo in seguito.
[ 1] Abilitazione pipeline front-end
Per ulteriori dettagli, segui questo collegamento Abilitazione pipeline front-end