如何解決AEM as a Cloud Service前端管道中的BUILD_NPM_AUDIT_ERROR

前端管道的第一個執行失敗並出現內部錯誤。 刪除Adobe Experience Manager專案程式碼中的兩個節點,如本文提供的檔案所述。

說明 description

環境

Adobe Experience Manager as a Cloud Service (AEMaaCS)

問題/症狀

前端管道的首次執行失敗並出現內部錯誤。

錯誤訊息:

Cloud Manager an internal error during the fast front-end pipeline deployment. If this recurs, please encounter Adobe Support.

build.log中有BUILD_NPM_AUDIT_ERROR。

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)

本文說明如何解決此問題。

解決方法 resolution

刪除您AEM專案程式碼中的下列兩個節點,如檔案[ 1]所述:

  1. /conf/< site-name> /sling:configs/com.adobe.aem.wcm.site.manager.config.SiteConfig
  2. /conf/< site-name> /sling:configs/com.adobe.cq.wcm.core.components.config.HtmlPageItemsConfig

前端管道會使用已部署主題的套件名稱更新SiteConfig節點,但如果套件名稱和SiteConfig設定不同,則會失敗。

詳細資訊如下:

步驟 1.檢查位於以下路徑的.content.xml檔案:
/ui.content/src/main/content/jcr_root/conf/appId/_sling_configs/

步驟 2:刪除兩個節點定義:

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>

步驟 3.在Cloud Manager中重新執行前端管道。

在步驟3完成後,AEM將正確重新建立這些設定節點。 此管道在之後應該會成功。

[ 1]正在啟用前端管道
如需詳細資訊,請依照此連結啟用前端管道

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f