Closed jesperordrup closed 2 weeks ago
This only solves one of the two. This remains:
TypeError: __vite_ssr_import_1__.Provider is not a function
In src\lib
What version of bits are you using? Is it the latest? Also, a repro would really help, because I couldn't reproduce this.
I have the same issue, just created the project, added sidebar-01, same error. Version of bits-ui is 0.21.16
.
I think I found the issue. add sidebar-01
seems to install the latest stable bits-ui, whereas it actually needs to install a pre-release version for Svelte 5 compatibility.
After replacing the bits-ui version with one of the pre-releases, I was greeted with ShadCN:
I have the same issue, just created the project, added sidebar-01, same error. Version of bits-ui is
0.21.16
.
Thanks for covering :-) (Sorry for no response. Didnt see notification. )
Describe the bug
2 errors
sidebar-page.svelte doesnt import
AppSideBar
correct:import AppSidebar from "./components/app-sidebar.svelte";
Which gives a not found. Replaceding with:
import AppSidebar from "$lib/components/app-sidebar.svelte";
Running project gives me the following error
TypeError: __vite_ssr_import_1__.Provider is not a function
In
src\lib\components\ui\tooltip\index.ts
i find this line with an errorconst Provider = TooltipPrimitive.Provider;
Error is
Property 'Provider' does not exist on type 'typeof import("c:/code/sv/sv2/node_modules/bits-ui/dist/bits/tooltip/index
This file only exports:
Reproduction
Install clean svelte 5 using new sv selected bun Install shadcn acoording to https://next.shadcn-svelte.com/docs/installation/sveltekit Installed all UI components (accepted overriding everything) From https://next.shadcn-svelte.com/blocks installed first example
bunx shadcn-svelte@next add sidebar-01
Updated the reference in sidebar-page.svelte toimport AppSidebar from "$lib/components/app-sidebar.svelte";
Update +page.svelte
ran
bun dev
Error as described before
Logs
System Info
Severity
annoyance