After updating my SvelteKit project, because Netlify has started giving me some grief, my builds are failing with this error:
"invalid" is not exported by "node_modules/@sveltejs/kit/src/exports/index.js", imported by "src/routes/+page.server.ts"
I have this line in my +page.server.ts
that's causing the error:
import { redirect, invalid, error } from "@sveltejs/kit";
I've looked it up and indeed there is no Invalid export in that index.js
file.
Before the update, everything was working fine.
Cheers.
Before update, everything worked just fine
Replace invalid
with fail
import { fail } from '@sveltejs/kit';