Expand my Community achievements bar.

SOLVED

AEM Cloud manger build failing due to large build log size

Avatar

Level 2

Hi, 

 

The AEM cloud manager build is failing due to the large size of build log file > 500MB.

The errors are mostly related to JS syntax, for example:

ERROR - This language feature is only supported for ECMASCRIPT6 mode or better: arrow function. const toType = obj => {

 

Let me know if any solutions for this, how to get rid of these errors during build.

Note: The UI and functionality is working fine, these errors are there during build.

 

Thanks,

Bharat 

1 Accepted Solution

Avatar

Correct answer by
Level 2

Finally, this setting is working fine:

 
"htmllibmanager.processor.js": [
        "default:gcc;languageIn=ECMASCRIPT_2019;languageOut=ECMASCRIPT_2015;compilationLevel=whitespace",
        "min:gcc;languageIn=ECMASCRIPT_2019;languageOut=ECMASCRIPT_2015;compilationLevel=whitespace"
    ],

It gets rid of the above $jscomp error as well the strict type checking, if using ECMASCRIPT_2015 language in parameter. 

View solution in original post

6 Replies

Avatar

Employee Advisor

Hi @bhansa ,

I can see the log file generated for my deployment process is around 2 MB. Its is simple project. In your case, I believe 500 is little overwhelming for the system which is why its failing. There is configuration available on the cloud manager to skip/bypass the steps. I would recommend 2 things here:

  1. Try to resolve your errors so that most of the errors are resolved and doesn't get logged in.
  2. Reach out to the Cloud SME from Adobe to get more insights of what is happening and if there is some way to skip logging those checks from backend.

 There is no configuration on the Cloud Manager that you can do to avoid/bypass the logging. 

Avatar

Level 2

So, here is the update I have which seems to be working. I have update the osgi config for HTML library manager to: 

 

"default:gcc;languageIn=ECMASCRIPT_2015;compilationLevel=whitespace",
"min:gcc;languageIn=ECMASCRIPT_2015;compilationLevel=whitespace"

 

This is working but now the pages are throwing error in console: 

`Uncaught ReferenceError: $jscomp is not defined`

Avatar

Employee Advisor

tThat looks good. But this error is related to undefined JS variable. I would say fix the errors in the code and it should be good to go.

Avatar

Level 2

Thanks for the reply @Anish-Sinha 

This jscomp variable is coming from the gcc compiler scripts I believe.

Whenever 

languageIn=ECMASCRIPT_2015;

 is used, it adds some extra code in clientlibs, and that's why this error.

 

 l.r = function(e) {
        $jscomp.initSymbol();
        $jscomp.initSymbol();
        $jscomp.initSymbol();
        "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
            value: "Module"
        }),
        Object.defineProperty(e, "__esModule", {
            value: !0
        })
    }

 

Avatar

Correct answer by
Level 2

Finally, this setting is working fine:

 
"htmllibmanager.processor.js": [
        "default:gcc;languageIn=ECMASCRIPT_2019;languageOut=ECMASCRIPT_2015;compilationLevel=whitespace",
        "min:gcc;languageIn=ECMASCRIPT_2019;languageOut=ECMASCRIPT_2015;compilationLevel=whitespace"
    ],

It gets rid of the above $jscomp error as well the strict type checking, if using ECMASCRIPT_2015 language in parameter. 

Avatar

Administrator

@bhansa 

[Webinar | AEM GEMs] Looking under the hood - Cloud Manager 2022 | Register: https://adobe.ly/3t4jfgp  & Ask Questions related to this Webinar: https://adobe.ly/3O0rdzd 

Date &Time: Wednesday, June 15, 2022 - 8 am PDT OR 5 pm CET OR 8.30 pm IST
Speakers: Remus Stratulat & Shankari Panchapakesan

Share this within your Organisation and with your AEM peers!!



Kautuk Sahni