delucis / astro-embed

Low-JavaScript embed components for Astro websites
https://astro-embed.netlify.app
MIT License
235 stars 38 forks source link

auto imports don't seem to work #154

Open VisualEhrmanntraut opened 3 weeks ago

VisualEhrmanntraut commented 3 weeks ago
Expected component AuToImPoRtEdAstroEmbed_LinkPreview to be defined: you likely forgot to import, pass, or provide it.

I've added embeds() before starlight(...).

delucis commented 3 weeks ago

Thanks for the issue @VisualEhrmanntraut! Could you share a reproduction of the issue so we can debug it?

VisualEhrmanntraut commented 3 weeks ago

astroembedrepro.zip run pnpm run dev and go to the index page, it will show the compilation error sorry if you expected an online hosted version

delucis commented 3 weeks ago

An online version using StackBlitz or a GitHub repo would be great if you could possibly make one. Downloading a random ZIP is always a little hairy — would prefer to avoid it 😅

VisualEhrmanntraut commented 3 weeks ago

Here: https://github.com/VisualEhrmanntraut/AstroEmbedAutoimportError

VisualEhrmanntraut commented 3 weeks ago

(I would've used StackBlitz, but it either hates me or the fact I'm using Safari. The commands are running too slow to do anything.)

delucis commented 3 weeks ago

I would've used StackBlitz

No worries — it’s actually very easy to open any GitHub repo on StackBlitz by doing stackblitz.com/REPO-URL, so this is great. Will take a look.

delucis commented 3 weeks ago

Thanks again for the repro. I can confirm I’m seeing the bug on StackBlitz, but I’m a bit baffled as to why. I’ve tried various versions including the exact same versions of Starlight and Astro as the astro-embed docs themselves use (because they are working!) but I’ve had no luck. Not sure why. Also weird that I’m seeing the same also with older versions, so not quite clear to me what’s going on. I also tried using npm instead of pnpm just in case that was the issue, but that didn’t help either.

Might need to dig in to astro-embed to add some logging and see if we can see something funky happening with the MDX AST.