This problem still exists for me in Dec 2024.
Only way I could solve the error was to add this to tsconfig.json at the root level.
tsconfig.json
"include": [ "./src", ".svelte-kit/ambient.d.ts" // added this ]