Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto imports don't seem to work #154

Open
VisualEhrmanntraut opened this issue Oct 22, 2024 · 7 comments
Open

auto imports don't seem to work #154

VisualEhrmanntraut opened this issue Oct 22, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@VisualEhrmanntraut
Copy link

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

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

@delucis
Copy link
Owner

delucis commented Oct 22, 2024

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

@VisualEhrmanntraut
Copy link
Author

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
Copy link
Owner

delucis commented Oct 23, 2024

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 added a commit to VisualEhrmanntraut/AstroEmbedAutoimportError that referenced this issue Oct 23, 2024
@VisualEhrmanntraut
Copy link
Author

@VisualEhrmanntraut
Copy link
Author

(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
Copy link
Owner

delucis commented Oct 23, 2024

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
Copy link
Owner

delucis commented Oct 23, 2024

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 delucis added the bug Something isn't working label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants