Error using svelte-multiselect in Svelte REPL
@otprocta Thanks for reporting. Looks like something went wrong in the transition from v4 to v5. Just looked in the package folder at generated files. MultiSelect.svelte now has a weird remnant from a type import line
import './';
that used to be removed entirely. Not sure if that's the cause for this error. Need to investigate more. As a short-term fix, you can append package version numbers onto NPM imports. Your error disappears if you use the latest v4 release:
- import MultiSelect from 'svelte-multiselect'
+ import MultiSelect from '[email protected]'
Unfortunately these errors are hard to troubleshoot in the REPL due to lack of stack trace (outstanding issue https://github.com/sveltejs/sites/issues/173) and I can't reproduce locally.
@otprocta Small update: this might be an issue with the Svelte REPL and not with MultiSelect. Follow https://github.com/sveltejs/sites/issues/354 for further developments.
Just noticed the latest version 7.0.2 of svelte-multiselect runs in the Svelte REPL successfully. All versions from 5.0.0 to 7.0.1 still error:
Unexpected token (Note that you need plugins to import files that are not JavaScript)
Looks like removing the circular import between src/lib/{index.ts<->MultiSelect.svelte} in #131 also solved this error.