"Cannot find module" in VSCode
finnsnape opened this issue · comments
Finn 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.
Janosh Riebesell commented
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.
Janosh Riebesell commented