Open ahmetkaratass opened 12 months ago
Thanks for the report! Could you provide a skeleton vite-react project that has the settings enabled that make the build fail for you?
'LiveKitRoom' cannot be used as a JSX component.
Its return type 'ReactNode' is not a valid JSX element. Type 'undefined' is not assignable to type 'Element | null'. <LiveKitRoom
There is a mismatch error in the new version type
which version of React are you using?
In order to be able to reference components with useRef
we changed the ReturnType of some components from ReactElement
to ReactNode
. This should not result in any breaking changes though when using the components within a JSX declaration.
Where {@link ReactElement} only represents JSX,
ReactNode
represents everything that can be rendered.
Select which package(s) are affected
\@livekit/components-react
Describe the bug
In our Vite + React project, I expect that when I'm building with
"moduleResolution": "bundler"
in typescript, it should build the project.What happens now, it fails because it can't find type declarations.
However, if I change the moduleResolution to "node" or add
"skipLibCheck": true
in my tsconfig.json, it builds the project.Reproduction
Packages:
My tsconfig.json:
Components that I use from the library:
Logs
System Info
Severity
serious, but I can work around it
Additional Information
No response