Coveo object unavailable in Lightning component
Coveo object unavailable in Lightning component
Symptoms
When creating a Lightning component that bundles the Coveo components (see Integrate Coveo Lightning Aura components in a custom component for your Experience Cloud site) and trying to reference the Coveo object, you get an error message that looks like one of the following messages:
Uncaught Action failed: c:communityCoveo$controller$onInterfaceContentLoaded [$ is not a function]
or
Cannot read property $ of undefined
Cause
Your custom component likely uses API version 40, which means that Lightning Locker is automatically enabled.
When Lightning Locker is enabled, the window object isn’t shared with other components.
Resolution
Your custom component needs to use an API version prior to 40.0.
-
In Salesforce, open the Developer Console (see Open the Developer Console).
-
Open your custom component.
-
In the right sidebar, select Bundle Version Settings.
-
In the Bundle Version Settings window, next to API Version, select an API version prior to 40.0.
-
Select Save.