pstanoev / simple-svelte-autocomplete

Simple Autocomplete / typeahead component for Svelte
http://simple-svelte-autocomplete.surge.sh/
MIT License
464 stars 78 forks source link

Autocomplete isn't a valid SSR component #182

Open paul-schwendenman opened 2 years ago

paul-schwendenman commented 2 years ago

I am not sure what exactly is causing this but when I try to use this library in my sveltekit project I get an error:

<AutoComplete> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules

Error: <AutoComplete> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules

I am adding simple-svelte-autocomplete to my devDependencies.

If I copy the whole component into my project I don't get the error, so maybe the issue is in the packaging somehow?

I'll try to update this issue if I learn anything else, but I didn't want to forget to make it

absowoot commented 10 months ago

I was having the same issue changing the import to the following is my current work-around

import AutoComplete from "simple-svelte-autocomplete/src/SimpleAutocomplete.svelte";