Expand my Community achievements bar.

Join us in celebrating the outstanding achievement of our AEM Community Member of the Year!
SOLVED

AEM Cloud -com.adobe.granite.clientlibs.compiler.gcc.impl.GCCLogErrorManager -JSC_LANGUAGE_FEATURE -Only supported for ECMASCRIPT_2020 mode or better: Optional chaining.

Avatar

Level 4

Hi All,

 

I am getting errors in the build pipeline which are not actually functionality breaking the functionality on the site but are more of nuisance errors in the AEM Cloud pipeline-

com.adobe.granite.clientlibs.compiler.gcc.impl.GCCLogErrorManager - apps/myProject/clientlibs/clientlib-aspot-slick.min.js:7:47: ERROR - [JSC_LANGUAGE_FEATURE] This language feature is only supported for ECMASCRIPT_2020 mode or better: Optional chaining.

 

There are many more such places where this error gets raised up. But this is just the pipeline validation I believe.

On the AEM instance the aspot slick min js is working and loading perfectly fine.

 

Why do these errors then come up in the pipeline and how to get rid of them?

 

BR,

Nagesh

1 Accepted Solution

Avatar

Correct answer by
Level 8

Hi @NageshRaja 
From your log message I understand that the aspot-slick library is using optional chaining, which is the ?. operator, which was introduced in ES2020.


Maybe this would help:

jsProcessor="[default:none,min:none;languageIn=ECMASCRIPT_2020;languageOut=ECMASCRIPT_2020]"

 

View solution in original post

4 Replies

Avatar

Level 8

Hi @NageshRaja ,

Seem like this is an external library. If it's already minified I would suggest to disable additional minifying by GCC for this clientlibrary. 
Example:

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
    jcr:primaryType="cq:ClientLibraryFolder"
    categories="[myProject.dependencies,myProject.dependencies.aspot-slick]"
    cssProcessor="[default:none,min:none]"
    jsProcessor="[default:none,min:none]"
    allowProxy="{Boolean}true"/>

jsProcessor describes rule to disable processing by GCC.

Best regards,

Kostiantyn Diachenko.

Avatar

Correct answer by
Level 8

Hi @NageshRaja 
From your log message I understand that the aspot-slick library is using optional chaining, which is the ?. operator, which was introduced in ES2020.


Maybe this would help:

jsProcessor="[default:none,min:none;languageIn=ECMASCRIPT_2020;languageOut=ECMASCRIPT_2020]"

 

Avatar

Administrator

@NageshRaja Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni

Avatar

Level 4

Removing additional minification and disabling processing by GCC would work for this instance but there are another 100+ instances where they are such errors reported!

Since the AMS clientlibs is successfully processed without any such error then why is AEMaaCS flagging this as concern?

This would mean we have to manually set language in and language out for 100s of clientlibs.

 

Is there any other way to resolve this?