-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When trying to import and use the SelectPrimitive component from bits-ui, I encountered the following error:
TypeError: Cannot read properties of undefined (reading 'Root')
This issue occurs when trying to access the Root property of SelectPrimitive. The error is triggered at the following line in my code:
const Root = SelectPrimitive.Root;
The SelectPrimitive object is undefined or doesn’t contain the Root property, causing the application to crash.
The error will occur, and the application will break with TypeError: Cannot read properties of undefined (reading 'Root').
"bits-ui": "^2.11.8",
"@sentry/sveltekit": "^10.20.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.46.1",
"vite": "7.1.11",
Affected component/components
Select-group,Select,Select-Content etc.
How to reproduce
Steps to reproduce the behavior:
in index.ts
Import SelectPrimitive from bits-ui:
import { Select as SelectPrimitive } from "bits-ui";
Access the Root property:
const Root = SelectPrimitive.Root;
Codesandbox/StackBlitz link
No response
Logs
System Info
I am Using Mac OS , browser: Google Chrome,Before submitting
- I've made research efforts and searched the documentation
- I've searched for existing issues
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
