--- title: Coveo object unavailable in Lightning component slug: '1100' canonical_url: https://docs.coveo.com/en/1100/ collection: coveo-for-salesforce source_format: adoc --- # 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](https://docs.coveo.com/en/1193/)) and trying to reference the `Coveo` object, you get an error message that looks like one of the following messages: ```text Uncaught Action failed: c:communityCoveo$controller$onInterfaceContentLoaded [$ is not a function] ``` or ```text 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](https://help.salesforce.com/articleView?id=code_dev_console_opening.htm)). . 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**.