Data Router ยท console.warn
router.mountDevtools(el) needs a router with metrics()/on() and a DOM element to render into; the panel was not mounted.
Printed by Data Router, prefixed [lattice], since 1.34.0.
Warnings reference › data-router:devtools-target
- Identifier
data-router:devtools-target- Raised by
- Data Router
- Since
- 1.34.0
What happened
The observability panel had either no usable router or no element to draw into. A no-op controller is returned - its destroy() and refresh() do nothing - so calling code is safe, but there is no panel.
The fix
Pass the router and a real element. In a headless environment the panel cannot be mounted at all.
The smallest fix
router.mountDevtools(document.querySelector('#router-devtools'));
Reference
Covered in full at the API reference.