Open amit13k opened 1 month ago
From next.134 can't access to svelte/internal/client
(https://github.com/sveltejs/svelte/releases/tag/svelte%405.0.0-next.134)
Currently, i downgrade to next.133 and wait Astro fix it
Svelte checks whether the import path starts with 'svelte/internal', so it is possible to import from the file path to bypass error checking; or directly 'fake' the 'add_snippet_symbol' function, which merely adds a 'snippet' identifier to the function, but neither approach seems to be a long-term solution.
Downgrading @astrojs/svelte
to 4.0.4
and changing to static
for output: "static"
will get you up and running for now.
package.json:
{
"name": "blog",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro check --watch & astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.7.0",
"@astrojs/mdx": "^3.0.1",
"@astrojs/rss": "^4.0.6",
"@astrojs/sitemap": "^3.1.5",
"@astrojs/svelte": "^4.0.4",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/vercel": "^7.6.0",
"astro": "^4.9.2",
"prettier-plugin-astro": "^0.14.0",
"prettier-plugin-svelte": "^3.2.3",
"prettier-plugin-tailwindcss": "^0.6.1",
"svelte": "^5.0.0-next.148",
"tailwindcss": "^3.4.3",
"typescript": "^5.4.5"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.1",
"prettier": "^3.2.5"
}
}
astro.config.mjs:
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import svelte from "@astrojs/svelte";
import tailwind from "@astrojs/tailwind";
import { defineConfig } from 'astro/config';
import vercel from '@astrojs/vercel/static';
export default defineConfig({
site: 'https://matthewdavis.io',
integrations: [mdx(), sitemap(), svelte(), tailwind()],
output: "static",
adapter: vercel()
});
The same problem 😞
I created PR to fix this issue: https://github.com/sveltejs/svelte/pull/12008
This workaround doesn't work btw, it totally breaks the page.
As a temporary workaround an older version works with Astro... npm install --save-dev svelte@5.0.0-next.133
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Updating to svelte@5.0.0-next.141 throws the following error,
What's the expected result?
No errors
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-w4fbdg?file=package.json
Participation