You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { useLocalParticipant, useRoomContext } from '@livekit/components-react';
import { Track } from 'livekit-client';
Logs
../node_modules/@livekit/components-core/dist/observables/room.d.ts:4:41 - error TS2307: Cannot find module 'livekit-client/dist/src/room/Room' or its corresponding type declarations.
4 import type { RoomEventCallbacks } from 'livekit-client/dist/src/room/Room';~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/@livekit/components-core/dist/observables/participant.d.ts:4:48 - error TS2307: Cannot find module 'livekit-client/dist/src/room/participant/Participant' or its corresponding type declarations.
4 import type { ParticipantEventCallbacks } from 'livekit-client/dist/src/room/participant/Participant';~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/@livekit/components-core/dist/observables/participant.d.ts:41:100 - error TS2307: Cannot find module 'livekit-client/dist/src/proto/livekit_models_pb' or its corresponding type declarations.
41 exportdeclarefunctionparticipantPermissionObserver(participant: Participant): Observable<import("livekit-client/dist/src/proto/livekit_models_pb").ParticipantPermission | undefined>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/@livekit/components-react/dist/hooks/useLocalParticipantPermissions.d.ts:10:66 - error TS2307: Cannot find module 'livekit-client/dist/src/proto/livekit_models_pb' or its corresponding type declarations.
ion | undefined;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/@livekit/components-react/dist/hooks/useParticipantPermissions.d.ts:15:103 - error TS2307: Cannot find module 'livekit-client/dist/src/proto/livekit_models_pb' or its corresponding type declarations.
15 exportdeclarefunctionuseParticipantPermissions(options?: UseParticipantPermissionsOptions): import("livekit-client/dist/src/proto/livekit_models_pb").ParticipantPermission | undefined;
'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
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
The text was updated successfully, but these errors were encountered: