flowbite-svelte icon indicating copy to clipboard operation
flowbite-svelte copied to clipboard

Error with Svelte 5.0.0

Open tuemaytinh1981 opened this issue 1 year ago • 7 comments

Describe the bug

✘ [ERROR] No matching export in "node_modules/.pnpm/[email protected]/node_modules/svelte/src/internal/index.js" for import "get_current_component"

node_modules/.pnpm/[email protected][email protected]/node_modules/flowbite-svelte/dist/utils/createEventDispatcher.js:9:9:
  9 │ import { get_current_component } from 'svelte/internal';
    ╵          ~~~~~~~~~~~~~~~~~~~~~

10:43:53 PM [vite] error while updating dependencies: Error: Build failed with 1 error: node_modules/.pnpm/[email protected][email protected]/node_modules/flowbite-svelte/dist/utils/createEventDispatcher.js:9:9: ERROR: No matching export in "node_modules/.pnpm/[email protected]/node_modules/svelte/src/internal/index.js" for import "get_current_component" at failureErrorWithLog (/Users/maitrongtue/Documents/GitHub/odm/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1650:15) at /Users/maitrongtue/Documents/GitHub/odm/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1058:25 at /Users/maitrongtue/Documents/GitHub/odm/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1526:9 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Reproduction

<Button>Default</Button> <Button color="alternative">Alternative</Button>

Flowbite version and System Info

Svelte 5.0.0

tuemaytinh1981 avatar Dec 17 '23 15:12 tuemaytinh1981

"peerDependencies": { "svelte": "^4.0.0" },

shinokada avatar Dec 17 '23 20:12 shinokada

I thinks error in function utils/createEventDispatcher.js: import "get_current_component"... May be big change event function on Svelte 5.0.0.

tuemaytinh1981 avatar Dec 18 '23 14:12 tuemaytinh1981

This problem is already addressed with PR #1168 It needs the official tag though.

jjagielka avatar Dec 20 '23 16:12 jjagielka

@tuemaytinh1981 new version is released now. Can you please check if issue is corrected?

jjagielka avatar Dec 28 '23 12:12 jjagielka

@tuemaytinh1981 new version is released now. Can you please check if issue is corrected?

I still get this issue @jjagielka , It wont let me install unless I have v4 installed, which doesn't have some features I'm using.

greendoescode avatar Jan 08 '24 14:01 greendoescode

@GreenDiscord the line import { get_current_component } from 'svelte/internal'; does not exist any more in the code base. Can you please give the details what is blocking you?

jjagielka avatar Jan 09 '24 12:01 jjagielka

I have since removed flowbite from my code, but what was happening is it wouldn't let me install flowbite-svelte when I had higher then v4 installed of svelte/sveltekit... V4 had some features removed which I was using in other versions soo..

greendoescode avatar Jan 09 '24 15:01 greendoescode