From ebf641cdbbdbac834b5c0616b50d94ebcb7fb836 Mon Sep 17 00:00:00 2001 From: Neel Akolkar Date: Sat, 10 Oct 2026 16:41:10 +0100 Subject: [PATCH] Added workaround and error notes --- .../framework-guides/web-apps/sveltekit.mdx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/content/docs/workers/framework-guides/web-apps/sveltekit.mdx b/src/content/docs/workers/framework-guides/web-apps/sveltekit.mdx index 16233bdaac9..5b51b3aaba5 100644 --- a/src/content/docs/workers/framework-guides/web-apps/sveltekit.mdx +++ b/src/content/docs/workers/framework-guides/web-apps/sveltekit.mdx @@ -28,6 +28,22 @@ Run `wrangler deploy` in a project without a Wrangler configuration file and Wra Learn more about [automatic project configuration](/workers/framework-guides/automatic-configuration/). ::: +:::caution[First deploy fails with `Types file not found`] +When Wrangler configures an existing SvelteKit project, it runs the Svelte CLI (`sv add`) to install the Cloudflare adapter. This adds `wrangler types --check` to the `build` script in your `package.json`. The types file does not exist yet, so the first build fails with the following error: + +```txt +✘ [ERROR] Types file not found at worker-configuration.d.ts. +``` + +To fix this, generate the types file, then deploy again: + + + + + +You only need to do this once. Wrangler has already created your Wrangler configuration file, so the second deploy skips project setup. +::: +