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

Can't use Lucide Svelte with moduleResolution to "NodeNext" #2756

Open
5 of 30 tasks
Kayoshi-dev opened this issue Jan 28, 2025 · 2 comments
Open
5 of 30 tasks

Can't use Lucide Svelte with moduleResolution to "NodeNext" #2756

Kayoshi-dev opened this issue Jan 28, 2025 · 2 comments
Labels
🐛 bug Something isn't working

Comments

@Kayoshi-dev
Copy link

Package

  • lucide
  • lucide-angular
  • lucide-flutter
  • lucide-preact
  • lucide-react
  • lucide-react-native
  • lucide-solid
  • lucide-svelte
  • lucide-vue
  • lucide-vue-next
  • Figma plugin
  • source/main
  • other/not relevant

Version

0.474.0

Can you reproduce this in the latest version?

  • Yes
  • No

Browser

  • Chrome/Chromium
  • Firefox
  • Safari
  • Edge
  • iOS Safari
  • Opera
  • Other/not relevant

Operating system

  • Windows
  • Linux
  • macOS
  • ChromeOS
  • iOS
  • Android
  • Other/not relevant

Description

Hello,

We are trying to migrate our app to Svelte 5, when creating a new sample application, SvelteKit generates a project with the ModuleResolution sets to "NodeNext" by default. From the documentation it looks like this is the new default and standardized way to do this. However, when I try to use Lucide Svelte, it's no longer possible to import the icons like this (which still works well with "moduleResolution": "node") :
import { ArrowDownIcon } from 'lucide-svelte';

I get an error saying that :
Module '"lucide-svelte"' has no exported member 'ArrowDownIcon'.ts(2305)

I guess this has something to do with the exports line in the package.json but I'm not sure.

Steps to reproduce

  1. npx sv create my-app
  2. select typescript and library mode
  3. pnpm add lucide-svelte@latest
  4. import { ArrowDownIcon } from 'lucide-svelte';

Image

Checklist

  • I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
@Kayoshi-dev Kayoshi-dev added the 🐛 bug Something isn't working label Jan 28, 2025
@leeuwd
Copy link

leeuwd commented Feb 4, 2025

Same here when trying to use a Lucide React icon inside Sanity Studio.

@spacedawwwg
Copy link

Same here when trying to use a Lucide React icon inside Sanity Studio.

Same reason I'm here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants