-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Describe the problem
I'm trying to migrate an old Svelte Kit project following the "migration guide" and when I thought I was almost done, I came across this error:
Error: Invalid export 'DELETE' in src/routes/(...)/+page.server.js ('DELETE' is a valid export in +server.js)
And I found it very confusing, because the migration guide says:
Update +page.server.js
This file, previously referred to as a page endpoint, exists to provide your page with data from the server. The data retrieval function was rena med from GET to load. The other handlers still correspond to HTTP methods — POST, PUT, PATCH and DELETE.
So I'm really confused about this error. I have looked at the official docs of Svelte Kit and even the source code of kit, leaving me under the impression that +page.server.js
are not allowed to export those actions, but the migration guide is not saying that. So is the guide wrong or outdated?
Describe the proposed solution
Fix the migration guide if it's wrong. This is my second migration of a SvelteKit site and the process for me has been painful, confusing and frustrating. The documentation is really poor and fragmented.
Alternatives considered
No response
Importance
i cannot use SvelteKit without it
Additional Information
No response