Lattice Grid Buy a licence

AI ยท console.warn

ai.insights() needs a DOM element to mount into; none was given and there is no document.

Printed by AI, prefixed [lattice], since 1.42.0.

Warnings referenceai:insights:no-el

Identifier
ai:insights:no-el
Raised by
AI
Since
1.42.0

What happened

The insights panel had no element to mount into: none was passed, config.element is unset, and what was passed has no owner document. Nothing was mounted and the controller was returned unchanged, so the panel simply is not there.

The fix

Pass the element, or set element when you create the controller. In a headless or server environment there is nothing to mount and the panel should not be called at all.

The smallest fix

ai.insights(document.querySelector('#insights'));

Reference

Covered in full at the API reference.