Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[svelte-check] Cannot find module 'svelte-multiselect' or its corresponding type declarations. #233

Closed
tbydza opened this issue May 29, 2023 · 2 comments · Fixed by #236
Closed
Labels
pkg Package types TypeScript

Comments

@tbydza
Copy link

tbydza commented May 29, 2023

Hello,
I have problems using this library after update to version >= v8.4.0

<script lang="ts">
    import type {Option} from 'svelte-multiselect';
    import MultiSelect from 'svelte-multiselect';

    const opts: Option[] = [1, 2, 3, 4, 5]
</script>


<div class="test">
    This is just a test
</div>
<MultiSelect options={opts}></MultiSelect>

When I import from svelte-multiselect, svelte-check will throw error: Cannot find module 'svelte-multiselect' or its corresponding type declarations.. Build is ok, code works, only svelte-check is the problem.

I found this svelte/package v2 issue here.
Did you managed to solve it? Or is it svelte-check issue and I should create issue there?

@tbydza tbydza added the bug Something isn't working label May 29, 2023
@janosh
Copy link
Owner

janosh commented May 29, 2023

The recommended fix is to update to TypeScript v5 and set "moduleResolution": "bundler". Let me know if that doesn't fix the issue or if something prevents you from upgrading.

@janosh janosh added pkg Package and removed bug Something isn't working labels May 29, 2023
@tbydza
Copy link
Author

tbydza commented May 31, 2023

I already upgraded to TS v5 with "moduleResolution": "bundler".
But I found the issue, I am using multiple tsconfig files and svelte-check was using the the wrong tsconfig without "moduleResolution": "bundler". After I've fixed svelte-check parameters, it is working without problem.
Anyway, thank you for your help and sorry to bother you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg Package types TypeScript
Projects
None yet
2 participants