Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

Svelte 5 false positive - Cannot find module 'svelte-filepond' or its corresponding type declarations

$
0
0

Stack: Svelte 5 / SvelteKit / Filepond

I'm getting a false positive for a missing Filepond dependency in my SvelteKit app. 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 and working as expected 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

EDIT: I've added // @ts-ignore as a temporary workaround for the time being


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>