Closed ezra-en closed 4 months ago
Was this executed in a new project or a preexisting one? Judging by the output of the system info, it looks like an older project.
If that's the case, can you send the contents of your svelte.config.js
file and your tsconfig.json
?
This was executed in a pre-existing SvelteKit project, yes.
```json { "extends": "./.svelte-kit/tsconfig.json", "compilerOptions": { "allowJs": true, "checkJs": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, "strict": true } // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias // // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes // from the referenced tsconfig.json - TypeScript does not merge them in } ```
```javascript import adapter from '@sveltejs/adapter-static'; import { vitePreprocess } from '@sveltejs/kit/vite'; /** @type {import('@sveltejs/kit').Config} */ const config = { // Consult https://kit.svelte.dev/docs/integrations#preprocessors // for more information about preprocessors preprocess: vitePreprocess(), kit: { adapter: adapter({ fallback: 'index.html' }) } }; export default config; ```
This is an older project template that I had and just used to pick up an old project I needed to work with. I can try and port everything over and reinit the project (it's no biggie) but since there was an issue with what is supposed to be a supported svelte-kit project, I thought I would open an issue.
Do you have a src/lib
directory? IIRC, older versions of sveltekit won't generate the $lib
path alias if the lib
dir doesn't exist.
Hey, that's correct! I don't have that by default. Just adding the directory back manually got the init flow working again!
Describe the bug
npx shadcn-svelte@latest init
does not recognise$lib/components
as aliased in SvelteKit. Going through the init flow as instructed will result in this:Reproduction
no repro. go through the SvelteKit install flow with cli
v0.10.5
.Logs
No response
System Info
Severity
blocking all usage of shadcn-svelte