Uncaught ReferenceError: _ is not defined

Avatar

Avatar

sravs

Avatar

sravs

sravs

26-03-2021

while I'm trying to use a custom clientlib its throwing the error as Uncaught ReferenceError: _ is not defined I added dependency as lodash also.

can you please help me in this

r

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Bhuwan_B

Avatar

Bhuwan_B

Bhuwan_B

27-03-2021

Usually this error comes if your code has dependency on Underscore.js/LoDash.js . Can you please try validating if its added and loading properly. https://stackoverflow.com/questions/13556010/referenceerror-is-not-defined

Answers (2)

Answers (2)

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

883

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

883
Arun_Patidar
MVP

28-03-2021

please check sample code here if you are using color picker 

https://aemlab.blogspot.com/2019/07/aem-rte-custom-plugins-1.html

Avatar

Avatar

asutosh_j3

Avatar

asutosh_j3

asutosh_j3

26-03-2021

Hi @sravs 

Please add 'cq.jquery' as dependency and see if it resolves the issue.

 

Thanks!