houdini
houdini copied to clipboard
houdini vite plugin fail with latest sveltekit 2
Describe the bug
After creating fresh sveltekit project and initialize houdini setup, pnpm dev keep failing with error
pnpx create svelte@latest apppnpx houdini@latest init
Note I have to change after init as per kit upgrade docs
from
import { vitePreprocess } from '@sveltejs/kit/vite';
to
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
Severity
annoyance
Steps to Reproduce the Bug
vite dev
▲ [WARNING] Cannot find base config file "./.svelte-kit/tsconfig.json" [tsconfig.json]
tsconfig.json:2:15:
2 │ "extends": "./.svelte-kit/tsconfig.json",
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2:24:41 PM [vite-plugin-svelte] Your are using Svelte 5.0.0-next.26. Svelte 5 support is experimental, breaking changes can occur in any release until this notice is removed.
work in progress:
- svelte-inspector is disabled until dev mode implements node to code mapping
- hmr for .svelte files is disabled until hmr api is implemented
🎩 Generating runtime...
❌ failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /Users/schintha/Developer/Work/SPA/temp/console3/tsconfig.json
error when starting dev server:
_TSConfckParseError: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /Users/aaa/Developer/Work/SPA/temp/console3/tsconfig.json
at resolveExtends (file:///Users/aaa/Developer/Work/SPA/temp/console3/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-68d1a114.js:13660:9)
at parseExtends (file:///Users/aaa/Developer/Work/SPA/temp/console3/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-68d1a114.js:13614:28)
at parse$f (file:///Users/aaa/Developer/Work/SPA/temp/console3/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-68d1a114.js:13552:24)
at async loadTsconfigJsonForFile (file:///Users/aaa/Developer/Work/SPA/temp/console3/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-68d1a114.js:14199:24)
at async transformWithEsbuild (file:///Users/aaa/Developer/Work/SPA/temp/console3/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-68d1a114.js:13866:36)
at async extract_load_function (file:///Users/aaa/Developer/Work/SPA/temp/console3/node_modules/.pnpm/[email protected]/node_modules/houdini-svelte/build/plugin-esm/index.js:172319:20)
at async walk_routes (file:///Users/aaa/Developer/Work/SPA/temp/console3/node_modules/.pnpm/[email protected]/node_modules/houdini-svelte/build/plugin-esm/index.js:172558:41)
at async svelteKitGenerator (file:///Users/aaa/Developer/Work/SPA/temp/console3/node_modules/.pnpm/[email protected]/node_modules/houdini-svelte/build/plugin-esm/index.js:173079:3)
at async Promise.all (index 0)
at async codegen_default (file:///Users/aaa/Developer/Work/SPA/temp/console3/node_modules/.pnpm/[email protected]/node_modules/houdini-svelte/build/plugin-esm/index.js:173647:3)
ELIFECYCLE Command failed with exit code 1.
Reproduction
No response
Workaround is to update the "dev" script to svelte-kit sync && vite dev, but would be great to have it fixed on the Houdini side.
@AlecAivazis any plan to resolving this issue ?
without workaround: svelte-kit sync && vite dev developers trying first time may struggle and face bad experience.
if there are any road blocks, may be we should document this workaround.
I definitely plan on resolving it. My biggest hurdle right now is finding the time. if you have the time to explore a bit, let me know!
Just to update this issue with some conversations we've been having internally: since both of the bumps to support sveltekit 2 and svelte 5 will create major releases, we're going to wait until svelte 5 is ready before going to [email protected]
Will Houdini 2 have any new features ? I was thinking SvelteKit 2 and and svelte 5 changes are unrelated, and would be big impact for migration
no, [email protected] will very likely be mostly version bumps. there might be some random clean up but we dont have anything major planned.
anyway, i'm going to close this ticket since #1300 and its related friends will use the latest sveltekit version