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

Clientlib

Avatar

Level 6

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"