I’m trying to get Svelte, Flowbite and TypeScript working together. I was specifically testing the ability to handle modal dialog boxes. I found in my first round of testing that I could bring modals up from a button but not from code. So I tried again.
- I created a new virtual machine running Linux
- I followed the
[Getting Started][1]
(https://flowbite-svelte.com/pages/getting-started) guide - The site came up
To the index.svelte file I tried to import the modal code by entering:
<script>
import { Modal } from 'flowbite-svelte'
</script>
Now when I run the site I get:
500
Cannot find module 'svelte-heros' imported from '/home/test/Projects/modal/node_modules/flowbite-svelte/accordions/AccordionItem.svelte'
Error: Cannot find module 'svelte-heros' imported from '/home/test/Projects/modal/node_modules/flowbite-svelte/accordions/AccordionItem.svelte' at viteResolve (file:///home/test/Projects/modal/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:50410:25) ...
I've used npm to install 'svelte-heros' but it didn't change anything.
What might I be doing wrong here and how do I fix it?