Stack: Svelte 5 / Sveltekit / Filepond
I’m getting what seems to be a false positive for a missing Filepond dependency in my Sveltekit app and I can’t make it go away.
In a custom svelte component I’m importing Filepond like so:
import FilePond, { registerPlugin } from 'svelte-filepond';
Error: Cannot find module ‘svelte-filepond’ or its corresponding type declarations
Filepond is showing up in my app despite the error warning.
My package.json seems fine:
"dependencies": {
"filepond": "^4.31.1",
"filepond-plugin-image-exif-orientation": "^1.0.11",
"filepond-plugin-image-preview": "^4.6.12",
"svelte-filepond": "^0.2.2",
}
tsconfig:
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler"
},
}
vite.config:
export default defineConfig({
plugins: [sveltekit()],
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
}
});
svelte.config:
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: vitePreprocess(),
kit: {
adapter: adapter()
}
};
export default config;
Things I’ve tried:
- delete node_modules & .svelte-kit folders & reload
- run npm check
- run npm build
Could it be that Filepond isn’t yet compatible with Svelte 5?