AEM Cloud -com.adobe.granite.clientlibs.compiler.gcc.impl.GCCLogErrorManager -JSC_LANGUAGE_FEATURE -Only supported for ECMASCRIPT_2020 mode or better: Optional chaining. | Community
Skip to main content
NageshRaja
Level 5
December 13, 2024
Solved

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

  • December 13, 2024
  • 4 replies
  • 1257 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Tethich

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]"

 

4 replies

konstantyn_diachenko
Community Advisor
Community Advisor
December 13, 2024

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.

Kostiantyn Diachenko, Community Advisor, Certified Senior AEM Developer, creator of free AEM VLT Tool, maintainer of AEM Tools plugin.
Tethich
Community Advisor
TethichCommunity AdvisorAccepted solution
Community Advisor
December 13, 2024

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]"

 

kautuk_sahni
Community Manager
Community Manager
December 16, 2024

@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
NageshRaja
Level 5
January 1, 2025

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?