Closed suraj0901 closed 2 years ago
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:
npm i
npm run build
or npm run dev
Me too! What's the last working versions?
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
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?
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
.
That narrowed it down, thanks @austinjherman! PR here https://github.com/withastro/astro/pull/2216
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
but it was working fine before
Link to Minimal Reproducible Example
https://bnmiqzypo--github--3000.local.webcontainer.io