astro-embed icon indicating copy to clipboard operation
astro-embed copied to clipboard

auto imports don't seem to work

Open VisualEhrmanntraut opened this issue 1 year ago • 10 comments

Expected component AuToImPoRtEdAstroEmbed_LinkPreview to be defined: you likely forgot to import, pass, or provide it.

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

VisualEhrmanntraut avatar Oct 22 '24 07:10 VisualEhrmanntraut

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

delucis avatar Oct 22 '24 20:10 delucis

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

VisualEhrmanntraut avatar Oct 23 '24 14:10 VisualEhrmanntraut

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 😅

delucis avatar Oct 23 '24 15:10 delucis

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

VisualEhrmanntraut avatar Oct 23 '24 16:10 VisualEhrmanntraut

(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.)

VisualEhrmanntraut avatar Oct 23 '24 16:10 VisualEhrmanntraut

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 avatar Oct 23 '24 17:10 delucis

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.

delucis avatar Oct 23 '24 17:10 delucis

any update?

VisualEhrmanntraut avatar Jun 03 '25 17:06 VisualEhrmanntraut

@delucis ?

VisualEhrmanntraut avatar Sep 05 '25 00:09 VisualEhrmanntraut

Hey — sorry, haven’t had time to dedicate to this unfortunately. As I mentioned above:

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.

Hopefully that’s a useful pointer if anyone else has a moment to investigate!

delucis avatar Sep 09 '25 15:09 delucis