Nothing starts this attach function
The message
MARKLESS_ATTACH_NO_START_TRIGGER: attach={<source>} on <<tagName>> has no event handler on or inside the element, and no onVisible or onIdle on it. On a server-rendered page attach starts only when one of those runs, so <source> never runs there.
A server-rendered page ships no code until something asks for it. attach starts the first time an event handler on its element or inside it runs, or when onVisible or onIdle on the same element fires. On a page rendered in the browser it runs as soon as the element is created.
Add onVisible={() => {}} to <<tagName>> to start it when the element scrolls into view, or onIdle={() => {}} to start it once the page is idle.
https://markless.dev/errors/MARKLESS_ATTACH_NO_START_TRIGGERWords in angle brackets change from case to case.
Why
On a page the server renders, attach waits until something on its element asks for code: an event handler on the element or inside it, or onVisible or onIdle on the element itself. This element has none of those, so the function never runs there.
Fix
Add onVisible to start it when the element scrolls into view, or onIdle to start it once the page is idle. An element that only ever renders in the browser needs one too: the build cannot tell it apart from one the server renders.
<canvas attach={(canvas) => drawChart(canvas)} onVisible={() => {}}/>