Skip to content

"LucideProvider" is not exported #4172

@meyfa

Description

@meyfa

Package

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

Version

1.0.0-rc.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

I have installed lucide-react@next ([email protected]) and imported some icons, e.g.

import { Search } from 'lucide-react'

When building the project with Vite 8.0.1, I get the following error:

Error: Error during dependency optimization:

Build failed with 1 error:

[MISSING_EXPORT] Error: "LucideProvider" is not exported by "../../node_modules/lucide-react/dist/esm/context.js".
      ╭─[ ../../node_modules/lucide-react/dist/esm/lucide-react.js:1695:10 ]
      │
 1695 │ export { LucideProvider, useLucideContext } from './context.js';
      │          ───────┬──────  
      │                 ╰──────── Missing export
──────╯

This seems correct. Looking at node_modules/lucide-react/dist/esm/lucide-react.js line 1695:

export { LucideProvider, useLucideContext } from './context.js';

but looking at node_modules/lucide-react/dist/esm/context.js, there is only:

export { useLucideContext };

that is, no LucideProvider export.

Steps to reproduce

  1. Install lucide-react@next
  2. Import any icon
  3. Run vite
  4. Observe the error

Note: It works fine on 0.577.0!

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions