Within a Svelte project seeing an error such as cannot find module '$lib/..' or its corresponding type declarations can be resolved by running npm run prepare. This will update tsconfig.json to add $lib to compilerOptions.paths.