Expand my Community achievements bar.

Clientlib

Avatar

Level 7

Error during include of component '/apps/clientlib_learning/component/content/myfirstcomponent'

Error Message:

org.apache.sling.scripting.sightly.SightlyException: Identifier libs/granite/sightly/templates/clientlib.html cannot be correctly instantiated by the Use API


<head data-sly-use.clientLib="${'libs/granite/sightly/templates/clientlib.html'}">

    <meta data-sly-call="${clientLib.all @ categories='apps.clientlib_learning'}" data-sly-unwrap></meta>

    <meta data-sly-call="${clientLib.js @categories='apps.clientlib_learning'}" data-sly-unwrap></meta>

    <meta data-sly-call="${clientLib.css @categories='apps.clientlib_learning'}" data-sly-unwrap></meta>

        </head>

     

1537801_pastedImage_0.png

what is the reason of error

2 Replies

Avatar

Level 10

Please share the complete error stack trace.

Avatar

Community Advisor

There is an issue with your code in first line.

add '/' before libs.

example:

data-sly-use.clientLib="/libs/granite/sightly/templates/clientlib.html"



Arun Patidar