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

🐛 BUG: New astro project with svelte #2213

Closed
suraj0901 opened this issue Dec 16, 2021 · 6 comments · Fixed by #2216
Closed

🐛 BUG: New astro project with svelte #2213

suraj0901 opened this issue Dec 16, 2021 · 6 comments · Fixed by #2216

Comments

@suraj0901
Copy link

What version of astro are you using?

0.21.12

What package manager are you using?

npm

What operating system are you using?

Linux

Describe the Bug

Today i initialise new astro project with svelte and i encountered this
image
but it was working fine before

Link to Minimal Reproducible Example

https://bnmiqzypo--github--3000.local.webcontainer.io

@suraj0901 suraj0901 changed the title 🐛 BUG: 🐛 BUG: New astro project with svelte Dec 16, 2021
@austinjherman
Copy link

austinjherman commented Dec 16, 2021

Yes! I'm having this same problem. Sometime yesterday my whole dev environment stopped working and I'm seeing similar error messages. Also using svelte with astro, but on a mac.

Here's another minimal reproduction using the minimal starter and one svelte component. There's a different error message but maybe it's related?

https://github.com/austinjherman/astro-unable-to-render-svelte

Steps to reproduce:

  1. fork the repo and get it on your local machine
  2. run npm i
  3. run npm run build or npm run dev

@boehs
Copy link
Contributor

boehs commented Dec 16, 2021

Me too! What's the last working versions?

@sarah11918
Copy link
Member

Confirming that this is also happening with our Svelte starter example from astro.new in CodeSandbox.

See the Discord thread for the "temporary workaround" of setting Svelte components to "client:only" to at least get the dev environment to start: https://discord.com/channels/830184174198718474/921107451854614538

@natemoo-re
Copy link
Member

Based on this timeline, I'm guessing that the new version of @sveltejs/vite-plugin-svelte that went out is why things are breaking? Does pinning @sveltejs/vite-plugin-svelte to 1.0.0-next.28 resolve the issue for anyone?

@austinjherman
Copy link

I tried pinning it as a dev dependency in package.json here. Still doesn't work in the sandbox though :/

Looking at the package-lock in that stackblitz, there are a couple different versions of @sveltejs/vite-plugin-svelte being used ranging from 1.0.0-next.28 to 1.0.0-next.32.

@natemoo-re
Copy link
Member

That narrowed it down, thanks @austinjherman! PR here #2216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants