Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

JS Minification fails using jsProcessor="min:gcc;languageIn=ECMASCRIPT6 for Clientlibs

rocks
Level 2
Level 2

Hi

After installing the SP2 upgrade for AEM6.3 the minification of js seems to fail.

Following is displayed in error.log.

  1. 19.11.2018 14:21:50.662 *ERROR* [0:0:0:0:0:0:0:1 [1542655310643] GET /etc/designs/<project-name>/clientlibs/js/features/<some-js-filename>-js.min.js HTTP/1.1] com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl Error during assembly of library.
  2. java.lang.IllegalArgumentException: No enum constant com.google.javascript.jscomp.CompilerOptions.LanguageMode.ECMASCRIPT6

at java.lang.Enum.valueOf(Unknown Source)

at com.google.javascript.jscomp.CompilerOptions$LanguageMode.valueOf(CompilerOptions.java:3022)

at com.adobe.granite.ui.clientlibs.processor.gcc.impl.GCCScriptProcessor.createCompilerOptions(GCCScriptProcessor.java:128)

at com.adobe.granite.ui.clientlibs.processor.gcc.impl.GCCScriptProcessor.process(GCCScriptProcessor.java:93)

at com.adobe.granite.ui.clientlibs.impl.HtmlLibraryBuilderImpl.processSources(HtmlLibraryBuilderImpl.java:122)

at com.adobe.granite.ui.clientlibs.impl.HtmlLibraryBuilderImpl.processSources(HtmlLibraryBuilderImpl.java:87)

at com.adobe.granite.ui.clientlibs.impl.HtmlLibraryBuilderImpl.build(HtmlLibraryBuilderImpl.java:135)

at com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl.update(HtmlLibraryManagerImpl.java:1411)

The above clientlibs has the jsprocessor=min:gcc;languageIn=ECMASCRIPT6.

Need help on the above.

3 Replies
smacdonald2008
Level 10
Level 10

This could be an upgrade issue. If no one provides a solution - please open a support ticket.

SB_PK
Level 2
Level 2

Hi Rakesh,

I got the same error in 6.4 fresh installation. I have installed the Service pack 3.. its resolved now.. i hope with SP2 for 6.4 as well it will work. Not sure on 6.3

aniac4
Level 1
Level 1

TL;DR

HtmlLibraryManager configuration property 'htmllibmanager.processor.js' should have languageIn attribute specified as follows:

- ‘ECMASCRIPT_2016’ for AEM SP >= 6.3.3 (this is the one that i verified so far, but the same may be for SP2)

- ‘ECMASCRIPT6’ for AEM 6.3.0

Example: min:gcc;obfuscate=true;languageIn=ECMASCRIPT_2016

Details

AEM 6.3.3 uses

     com.adobe.granite.ui.clientlibs.processor.gcc-1.0.6-CQ630-B0006.jar which leverages on

           closure-compiler-v20170806.jar

com.google.javascript.jscomp.CompilerOptions.class has an enum with the available options:

public static enum LanguageMode {

  ECMASCRIPT3,

   ECMASCRIPT5,

   ECMASCRIPT5_STRICT,

   ECMASCRIPT_2015,

   ECMASCRIPT6_TYPED,

   ECMASCRIPT_2016,

   ECMASCRIPT_2017,

   ECMASCRIPT_NEXT,

   NO_TRANSPILE;

}

AEM 6.3.0 uses

     com.adobe.granite.ui.clientlibs.processor.gcc-1.0.6.jar which leverages on

          closure-compiler-v20161024.jar

com.google.javascript.jscomp.CompilerOptions.class has an enum with the available options:

public static enum LanguageMode {

  ECMASCRIPT3,
   ECMASCRIPT5,
   ECMASCRIPT5_STRICT,
   ECMASCRIPT6,
   ECMASCRIPT6_STRICT,
   ECMASCRIPT6_TYPED,
   ECMASCRIPT7,
   ECMASCRIPT8,
   NO_TRANSPILE;

}