Using the latest SvelteKit (1.0.0-next.401) I have a problem importing components from lib using the $lib
syntax. I get an error and a red squiggly line (even though the import and web app works fine).
The error message is as follows:
Cannot find module '$lib/components/shared/header.svelte' or its corresponding type declarations. js(2307)
If a use a relative path, the error disappears.
jsconfig.json
/tsconfig.json
and.svelte-kit/tsconfig.json
, usually the former references the latter and the latter includes the$lib
path definitions. – Borchardt__layout.svelte
file before. – Duffey