janosh / svicons

35 SVG Icon Packs as Svelte Components

Home Page:https://npmjs.com/org/svicons

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Cannot find module" in VSCode

finnsnape opened this issue · comments

commented

Getting "Cannot find module '@svicons/ionicons-solid/trophy.svelte' or its corresponding type declarations.ts(2307)" on:

<script lang="ts">
  import Trophy from '@svicons/ionicons-solid/trophy.svelte';
</script>

In VSCode despite the icon actually working when doing <Trophy/>. I installed it with npm i -D @svicons/ionicons-solid.

Not sure if this is something you can fix, but perhaps it's an issue with the way you're exporting the icons in the js/ts files.

Thanks for the report. I noticed that too. I think it started a week or 2 ago. Looks like Svelte now expects foo.d.ts type declaration files to be named foo.svelte.d.ts. Patch release incoming.

Fixed in v0.1.9.

I missed something. Fixed in v0.1.11.

commented

I missed something. Fixed in v0.1.11.

Works great after updating, thanks