shinokada / svelte-heros-v2

Hero Icons v2 for Svelte. You can select outline and solid icons using the variation props. Svlete-Heros support major CSS framework. You can add additional CSS using the `class` props.
https://svelte-heros-v2.codewithshin.com
Apache License 2.0
41 stars 3 forks source link

[BUG]: Getting "Cannot find module 'svelte-heros-v2/Plus.svelte' or its corresponding type" #23

Open thadkrugman opened 9 months ago

thadkrugman commented 9 months ago

Description of the bug

When importing an icon using this method import Plus from 'svelte-heros-v2/Plus.svelte';, I get an error saying "Cannot find module 'svelte-heros-v2/Plus.svelte' or its corresponding type".

importing as import { Plus } from 'svelte-heros-v2': works also but without the error.

The code runs but I need to get rid of the error. I have the latest version of everything installed.

Steps To Reproduce

Try to import an icon in a svelte component.

Additional Information

No response

shinokada commented 9 months ago

Can you delete your node_modules directory and lock file (pnpm-lock.yml) and install it again.

thadkrugman commented 9 months ago

Can you delete your node_modules directory and lock file (pnpm-lock.yml) and install it again.

I tried that but it didn't fix the error. I also tried restarting the TS server with no luck.

shinokada commented 9 months ago

I can't produce the error. Here I put your code on Stackblitz and there is no error.