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

Is the Svelte Kit tutorial updated for v2? #541

Open
samzmann opened this issue Dec 15, 2023 · 1 comment
Open

Is the Svelte Kit tutorial updated for v2? #541

samzmann opened this issue Dec 15, 2023 · 1 comment

Comments

@samzmann
Copy link

I'm going throught the tutorial and enjoying it. Great work!
Now I just got the the Part 3 / Loading data / Page data section. I got curious about how error works so I consulted the docs, only to find that apparently in SvelteKit V2 I don't need to use throw:

import { error } from '@sveltejs/kit'

- throw error(500, 'something went wrong');
+ error(500, 'something went wrong');

See:

This got me wondering: why is the tutorial teaching me SvelteKit V1? Is this intentional, or did we forget to update the tutorial to V2..?

So I just wanted to ask/bring this to your attention.

Other than that, keep up the nice work!

@AdelBeit
Copy link

AdelBeit commented May 9, 2024

It's not updated, if you look at package.json it's using sveltejs/kit@^1.30.3
I forked it to update it but it's not straight forward, sveltekit 2 requires sveltejs/vite-plugin-svelte package, but when you install it the dev mode breaks.
build & preview work but the lesson dropdown selector stops working for some reason (all the options disappear). I don't want to update the tutorial code if I can't setup the environment without breaking anything first.
maybe a maintainer with a better knowledge of the code base could tackle this update

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

No branches or pull requests

2 participants