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

Temporary issue due to recent SvelteKit change #13

Open
paolodina opened this issue Jan 12, 2022 · 1 comment
Open

Temporary issue due to recent SvelteKit change #13

paolodina opened this issue Jan 12, 2022 · 1 comment

Comments

@paolodina
Copy link

paolodina commented Jan 12, 2022

In a brand new install, marking or deleting a todo throws a 400 error in the dev console.
This is because of this: sveltejs/kit#2989

They merged the change yesterday and I guess they'll release the new version soon. In the meantime if you have problems with new demo projects apply this patch:

diff --git a/svelte.config.js b/svelte.config.js
index aa85d10..c2d1c49 100644
--- a/svelte.config.js
+++ b/svelte.config.js
@@ -11,7 +11,11 @@ const config = {
                adapter: adapter(),
 
                // hydrate the <div id="svelte"> element in src/app.html
-               target: '#svelte'
+               target: '#svelte',
+
+               methodOverride: {
+                       allowed: ['PATCH', 'DELETE']
+               }
        }
 };
@paolodina paolodina changed the title Temporary issue due to recente SvelteKit change Temporary issue due to recent SvelteKit change Jan 12, 2022
paolodina added a commit to paolodina/sveltekit-prisma that referenced this issue Jan 12, 2022
@am283721
Copy link

The PR included the same updates that you've suggested here, but for some reason aren't included when scaffolding a new project. Will need to get this sorted out.

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