Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Unable to get a clean Html Library Compilation with AEM Forms 6.5.16 Add-on

Avatar

Level 2

Hi all, has anyone ever had a successful clean compilation of all out-of-the-box HTML Client Libraries?  

 

After upgrading a AEM 6.5.15 instance to AEM 6.5.16 + AEM Forms 6.5.16 Add-on, there have been many compilation errors in the logs indicating incompatible ECMASCRIPT6 syntax being used.  Following are the steps used: 

  1. Have a clean AEM 6.5.15 + AEM Form 6.5.15 Add-on setup then upgrade it to AEM 6.5.16 + AEM Forms 6.5.16 Add-on.
  2. From /system/console/configMgr, delete Adobe Granite Html Library Manager configuration to force it back to factory default configuration.
  3. From /libs/granite/ui/content/dumplibs.rebuild.html, invalidate caches and then rebuild libraries.
  4. Check error.log to ensure all clientlibs compiled cleanly.

 

However, at step 4, there were many errors.  Following are part of the errors.  Because Adaptive Forms sometimes use Rhino to execute ECMAScript bundled in a client library internally when executing server side validation (fd:rules) and af-expeditor is one of those that handles fd:rules, it's quite concerning.  Not to mention the sources of the libraries were not minimized before shipping to the client's browser...

 

19.03.2023 13:20:03.632 *INFO* [[0:0:0:0:0:0:0:1] [1679253024196] POST /libs/granite/ui/content/dumplibs.rebuild.html HTTP/1.1] com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl Start building JS library: /libs/fd/af-expeditor/clientlibs/authoring (minified)
19.03.2023 13:20:03.727 *ERROR* [[0:0:0:0:0:0:0:1] [1679253024196] POST /libs/granite/ui/content/dumplibs.rebuild.html HTTP/1.1] com.google.javascript.jscomp /libs/fd/af-expeditor/clientlibs/authoring.js:82:16: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT6 mode or better: const declaration.
  82|                 const editables = parent.Granite.author.ContentFrame.getEditables();
                      ^

19.03.2023 13:20:03.727 *ERROR* [[0:0:0:0:0:0:0:1] [1679253024196] POST /libs/granite/ui/content/dumplibs.rebuild.html HTTP/1.1] com.google.javascript.jscomp /libs/fd/af-expeditor/clientlibs/authoring.js:83:40: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT6 mode or better: arrow function.
  83|                 return editables.reduce((accMap, editable) => {
                                              ^

19.03.2023 13:20:03.727 *ERROR* [[0:0:0:0:0:0:0:1] [1679253024196] POST /libs/granite/ui/content/dumplibs.rebuild.html HTTP/1.1] com.google.javascript.jscomp /libs/fd/af-expeditor/clientlibs/authoring.js:84:20: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT6 mode or better: const declaration.
  84|                     const id = this._getEditableId(editable);
                          ^

19.03.2023 13:20:03.727 *ERROR* [[0:0:0:0:0:0:0:1] [1679253024196] POST /libs/granite/ui/content/dumplibs.rebuild.html HTTP/1.1] com.google.javascript.jscomp /libs/fd/af-expeditor/clientlibs/authoring.js:86:24: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT_2018 mode or better: object literals with spread.
  86|                         ...accMap,
                              ^

19.03.2023 13:20:03.727 *ERROR* [[0:0:0:0:0:0:0:1] [1679253024196] POST /libs/granite/ui/content/dumplibs.rebuild.html HTTP/1.1] com.google.javascript.jscomp /libs/fd/af-expeditor/clientlibs/authoring.js:87:24: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT6 mode or better: computed property.
  87|                         [id]: editable.path
                              ^

19.03.2023 13:20:03.727 *ERROR* [[0:0:0:0:0:0:0:1] [1679253024196] POST /libs/granite/ui/content/dumplibs.rebuild.html HTTP/1.1] com.google.javascript.jscomp /libs/fd/af-expeditor/clientlibs/authoring.js:101:8: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT6 mode or better: member declaration.
  101|         _getEditableId(editable) {
               ^

19.03.2023 13:20:03.727 *ERROR* [[0:0:0:0:0:0:0:1] [1679253024196] POST /libs/granite/ui/content/dumplibs.rebuild.html HTTP/1.1] com.google.javascript.jscomp /libs/fd/af-expeditor/clientlibs/authoring.js:105:22: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT6 mode or better: arrow function.
  105|         _getTreeJson: (_idPathMap) => (parentSOM, parentType) => (json, index) => {
                             ^

19.03.2023 13:20:03.727 *ERROR* [[0:0:0:0:0:0:0:1] [1679253024196] POST /libs/granite/ui/content/dumplibs.rebuild.html HTTP/1.1] com.google.javascript.jscomp /libs/fd/af-expeditor/clientlibs/authoring.js:105:38: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT6 mode or better: arrow function.
  105|         _getTreeJson: (_idPathMap) => (parentSOM, parentType) => (json, index) => {
                                             ^

19.03.2023 13:20:03.727 *ERROR* [[0:0:0:0:0:0:0:1] [1679253024196] POST /libs/granite/ui/content/dumplibs.rebuild.html HTTP/1.1] com.google.javascript.jscomp /libs/fd/af-expeditor/clientlibs/authoring.js:105:65: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT6 mode or better: arrow function.
  105|         _getTreeJson: (_idPathMap) => (parentSOM, parentType) => (json, index) => {
                                                                        ^

19.03.2023 13:20:03.727 *ERROR* [[0:0:0:0:0:0:0:1] [1679253024196] POST /libs/granite/ui/content/dumplibs.rebuild.html HTTP/1.1] com.google.javascript.jscomp /libs/fd/af-expeditor/clientlibs/authoring.js:107:16: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT6 mode or better: const declaration.
  107|                 const selfJson = ExpressionEditorTree._getTreeJsonForNode(json)
                       ^

19.03.2023 13:20:03.727 *ERROR* [[0:0:0:0:0:0:0:1] [1679253024196] POST /libs/granite/ui/content/dumplibs.rebuild.html HTTP/1.1] com.google.javascript.jscomp /libs/fd/af-expeditor/clientlibs/authoring.js:109:16: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT6 mode or better: const declaration.
  109|                 const unnamed = json.name == null || json.name === "";
                       ^

19.03.2023 13:20:03.727 *ERROR* [[0:0:0:0:0:0:0:1] [1679253024196] POST /libs/granite/ui/content/dumplibs.rebuild.html HTTP/1.1] com.google.javascript.jscomp /libs/fd/af-expeditor/clientlibs/authoring.js:115:34: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT6 mode or better: template literal.
  115|                     selfJson.id = `${parentSOM}[${index}]`
                                         ^

19.03.2023 13:20:03.727 *ERROR* [[0:0:0:0:0:0:0:1] [1679253024196] POST /libs/granite/ui/content/dumplibs.rebuild.html HTTP/1.1] com.google.javascript.jscomp /libs/fd/af-expeditor/clientlibs/authoring.js:126:20: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT6 mode or better: const declaration.
  126|                     const items = json.items instanceof Array ? json.items : [];
                           ^

19.03.2023 13:20:03.727 *ERROR* [[0:0:0:0:0:0:0:1] [1679253024196] POST /libs/granite/ui/content/dumplibs.rebuild.html HTTP/1.1] com.google.javascript.jscomp /libs/fd/af-expeditor/clientlibs/authoring.js:128:32: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT6 mode or better: arrow function.
  128|                         .filter(i => i != null)
                                       ^

 

 

 

 

1 Reply

Avatar

Level 2

Tried the reference at https://www.kryptonsquare.com/services/Consulting/Adobe-experience-manager-implementation-expert/aem....  Was able to get a cleaner compilation with following gcc settings for HTML Library Manager but there were still ECMASCRIP6 errors.

 

min:gcc;languageIn=ECMASCRIPT_NEXT;languageOut=ECMASCRIPT5