Closed xKesvaL closed 1 month ago
There was a bugfix for how paraglide's build output is handled internally in vite. This was supposed to be non-breaking but your issue makes it seem like there is a bug.
Revert the SvelteKit adapter to 0.6.14
for now while I troubleshoot this
Thanks for the Reproduction Repo!
Seems to be a linux-only issue, I can't reproduce this.
For now I'll fix this by only applying the build transformations when actually building & turning them off during development. Build seems to work fine.
You can try this workaround until the bug is fixed, to compile the messages using the cli on vite serve and use the plugin only on build.
...
import { watch } from 'vite-plugin-watch';
export default defineConfig({
plugins: [
{
...watch({
pattern: './src/lib/features/i18n/translations/*/*.json',
command: 'npm run i18n:compile',
silent: true
}),
apply: 'serve'
},
{
...paraglide({
project: './project.inlang',
outdir: './src/lib/paraglide'
}),
apply: 'build'
},
sveltekit(),
...
});
// package.json
...
"i18n:compile": "paraglide-js compile --project ./project.inlang --outdir ./src/lib/paraglide",
Thanks for the quick reply as always @LorisSigrist , reverting to 0.6.14
did in fact work for me, so I'll use that for now.
Also thanks anyways @canseyran for your workaround :)
Fix should be out later today, deployment is being blocked by another issue
What happened
Hi! I'm getting this error using paraglide-sveltekit
0.6.15
with paraglide1.8.0
. This did not happen before, when I was using a very much older version of the package which still was namedparaglide-js-adapter-sveltekit
Versions and troubleshooting
v21.6.2
andv20.13.0
bun
andpnpm
ssr
to false andprerender
to false in+layout.ts
Reproduction (repo)
This is the repo. To reproduce, just go on the
refactor-inlang
branch, install packages and run thedev
script. When getting on the website, the website simply crashes and gives the error below.However, when you try to run the
build
script it works fine, wether it is on my machine or on vercel.