Can't deploy with Netlify and Sveltekit


I can't deploy my site on Netlify build with Sveltekit. All I get is a blank home page with this error message Cannot read property 'split' of undefined. I have no problem deploying on Vercel (but I definitely need to deploy on Netlify for this specific project).

I have tried to deploy a couple other projects with the same stack (Sveltekit / Prismic) on Netlify and every time, I get the same error message. Does anyone have already encountered the same problem ?

Thanks for your help !

Hi @delon.steph ,

Thanks for posting this question!

Can you share your project files? You can share them as a git repo or ZIP file, and you can send them via DM if you like. Then I can take a look and try to debug this.


Hey @delon.steph ,

Thanks for sharing your repo in a DM! I took a look, and I think it's an issue with SvelteKit's Netlify adapter. (Lots of people are reporting the same error with Netlify in the last 48 hours in the Svelte Discord.) It might be an issue with a missing content-type header?

Downgrading the adapter worked for me:

npm i @sveltejs/adapter-netlify@1.0.0-next.19

If that doesn't work, you can follow the issue on the SvelteKit GitHub.

Let me know whether or not this helps.


Hey Sam, indeed with the latest updates of sveltekit and netlify adapter, it works great !
PS: love Prismic with Sveltekit :slight_smile:

1 Like

Awesome! I'm very happy to hear both of those things :laughing:

Let me know if you have any other questions or feedback!