themesberg / flowbite-svelte-icons

Official library for the free and open-source collection of over 430+ SVG icons for Flowbite and Svelte
https://flowbite-svelte.com/icons/svelte-4
MIT License
66 stars 10 forks source link

Argument of type 'typeof CogOutline' is not assignable to parameter of type 'ConstructorOfATypedSvelteComponent' #36

Closed brobee closed 8 months ago

brobee commented 8 months ago

Brand new install following the readme, but the the code below gives me this error:

<script>
    import { CogOutline, DotsVerticalOutline, DownloadSolid } from 'flowbite-svelte-icons';
</script>

<CogOutline />

Argument of type 'typeof CogOutline' is not assignable to parameter of type 'ConstructorOfATypedSvelteComponent'. Type 'typeof CogOutline' provides no match for the signature 'new (args: { target: any; props?: any; }): ATypedSvelteComponent'. Possible causes:

shinokada commented 8 months ago

I can't reproduce the problem.

Are you using v1 or v2? Can you create a https://stackblitz.com/ ?

brobee commented 8 months ago

I don't know honestly, just installed with: pnpm i -D flowbite-svelte-icons Here is the stackblitz.com. https://stackblitz.com/edit/vitejs-vite-w42aeb?file=src%2FApp.svelte

Obviously It won't give error on mouseover, but when I use the icon component, demo app does not appear, so there could be a problem. Appreciate your help.

shinokada commented 8 months ago

You have 2.0.0-next.3 on Svelte 4. Install 1.4.1.

pnpm i -D flowbite-svelte-icons@1.4.1
brobee commented 8 months ago

Thank you so much! What is the best way to find out such a compatibility issue?

shinokada commented 8 months ago

Please read the documentation, https://flowbite-svelte-icons.codewithshin.com.

brobee commented 8 months ago

thank you! We can close this ticket!