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

SvelteComponentTyped deprecated in Svelte 5 #2850

Closed
shenshouer opened this issue Feb 27, 2025 · 3 comments
Closed

SvelteComponentTyped deprecated in Svelte 5 #2850

shenshouer opened this issue Feb 27, 2025 · 3 comments

Comments

@shenshouer
Copy link

SvelteComponentTyped @deprecated Use Component instead. See migration guide for more information.

@sittim
Copy link

sittim commented Feb 27, 2025

I attempted to use the lucide-svelte with Svelte 5 and when I try to place icons into svelte component, I get these errors:

import {
  Heart,
  Twitter,      'default' is deprecated.
  Facebook,      'default' is deprecated.
  Linkedin,      'default' is deprecated.
from 'lucide-svelte';

I was able to import like so:

<script>
    import Heart from 'lucide-svelte/icons/heart';
    import Twitter from 'lucide-svelte/icons/twitter';
    import Facebook from 'lucide-svelte/icons/facebook';
    import Linkedin from 'lucide-svelte/icons/linkedin';
    import MessageCircle from 'lucide-svelte/icons/message-circle';
    import Clipboard from 'lucide-svelte/icons/clipboard';
    import Share2 from 'lucide-svelte/icons/share-2';
</script>

But the code editor LSP is complaining that Twitter is deprecated

<a   
 href={`https://twitter.com/intent/tweet?url=${encodeURIComponent(shareLink)}`}
│ target="_blank"
│ class="btn btn-xs bg-blue-500 text-white border-blue-700"
><Twitter class="w-4 h-4 text-white" />     ■ 'Twitter' is deprecated.
│ Twitter
</a>

The package version is:

npm list lucide-svelte
[email protected]

@ericfennis
Copy link
Member

Can you test if @lucide/svelte package is working for you?
See: #2753

@ericfennis ericfennis changed the title SvelteComponentTyped deprecated in Sevlte5 SvelteComponentTyped deprecated in Svelte 5 Feb 28, 2025
@ericfennis
Copy link
Member

See comment, for svelte 5 use @lucide/svelte

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants