錯誤:AEM Cloud Manager中的BUILD_MAVEN_PACKAGE_ERROR

每當您在Adobe Experience Manager Cloud Manager中遇到Build_Maven_Package_Error時,都是因為程式碼失敗。 通過使用npm (節點封裝管理員)更新失敗模組中的節點版本即可解決此問題。

說明 description

環境

Adobe Experience Manager Cloud Manager

問題/症狀

如何在AEM Cloud Manager中解決錯誤 — Build_Maven_Package_Error

19:19:53,214 [ main]  [ INFO]  ------------------------------------------------------------------------

    19:19:53,215 [ main]  [ INFO]  Reactor Summary for customer_name XXXX.XXX.XXXXXXX.XXXXXXXXXX:{}:

    19:19:53,215 [ main]  [ INFO]

    19:19:53,216 [ main]  [ INFO]  customer_name ...................................... SUCCESS [   3.600 s]

    19:19:53,217 [ main]  [ INFO]  customer_name - Core ............................... SUCCESS [  17.855 s]

    19:19:53,218 [ main]  [ INFO]  customer_name - UI Frontend ........................ FAILURE [ 01:16 min]

    19:19:53,218 [ main]  [ INFO]  customer_name – UI React ........................... SKIPPED

    19:19:53,218 [ main]  [ INFO]  customer_name - UI apps ............................ SKIPPED

    19:19:53,219 [ main]  [ INFO]  customer_name - UI content ......................... SKIPPED

    19:19:53,219 [ main]  [ INFO]  customer_name Project Package ...................... SKIPPED

    19:19:53,219 [ main]  [ INFO]  customer_name - Dispatcher ......................... SKIPPED

    19:19:53,220 [ main]  [ INFO]  ------------------------------------------------------------------------

    19:19:53,220 [ main]  [ INFO]  BUILD FAILURE

    19:19:53,220 [ main]  [ INFO]  ------------------------------------------------------------------------

    19:19:53,222 [ main]  [ INFO]  Total time:  01:41 min

    19:19:53,224 [ main]  [ INFO]  Finished at: 2023-02-07T19:19:53Z

    19:19:53,224 [ main]  [ INFO]  ------------------------------------------------------------------------

    19:19:53,226 [ main]  [ ERROR]  Failed to execute goal com.github.xxxxx:frontend-maven-plugin:1.7.6:npm (npm run prod) on project com.xyz.ui.frontend: Failed to run task: 'npm run prod' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2) ->[ Help 1]

    19:19:53,227 [ main]  [ ERROR]

P2票證中發生 錯誤:

``` Pipeline Name: Production Pipeline

Pipeline Status: FAILED

Failure Caused By: CUSTOMER

Failed Step: build

Error Message: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)

```## 解決方法 resolution此失敗是因為程式碼問題,需要使用npm更新失敗模組中的節點版本來解決。 若要進行此變更,請遵循下列步驟:1) 尋找正在反應器pom.xml中使用的節點版本。 以下範例= 16.14.0 pom.xml

<configuration>
        <nodeVersion>v16.14.0</nodeVersion>.
        <npmVersion>8.3.1</npmVersion>
    <configuration>
  1. 將此節點版本作為 devDependencies 新增到組建失敗模組的 package.json 檔案中。在上述範例中,這是UI前端。

    先前 - package.json

    "devDependencies": {
        "@babel/core": "7.0.0",
        "@babel/plugin-proposal-class-properties": "7.3.3",
        "@babel/plugin-proposal-object-rest-spread": "7.3.2",
        "@material/tab-bar": "12.0.0",
        },
    

    之後 - package.json

    "devDependencies": {
        "@types/node": "16.14.0",                          THIS LINE WAS ADDED
        "@babel/core": "7.0.0",
        "@babel/plugin-proposal-class-properties": "7.3.3",
        "@babel/plugin-proposal-object-rest-spread": "7.3.2",
        "@material/tab-bar": "12.0.0",
        },
    ```</u>
    
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f