Skip to content

Type 'Source' is not assignable to type 'ToggleSource'. #148

@anthonyshibo

Description

@anthonyshibo

Describe the bug

Type Mismatch in ConfigurationPanelItem.tsx: Source vs ToggleSource
Issue Type: Bug

​Environment:

Next.js v14.2.29
Operating System: Linux (Docker container)
Node.js version: v18.x (base image)

Problem Description:
The build fails due to a type incompatibility between the source prop being passed to TrackToggle component and its expected ToggleSource type. The current implementation passes a Source type variable that doesn't match the component's expected prop type.

./src/components/config/ConfigurationPanelItem.tsx:32:17
Type error: Type 'Source' is not assignable to type 'ToggleSource'.

30 | <TrackToggle
31 | className="px-2 py-1 bg-gray-900 text-gray-300 border border-gray-800 rounded-sm hover:bg-gray-800"

32 | source={source}
| ^
33 | />
34 | {source === Track.Source.Camera && (
35 |

Reproduction

​Steps to Reproduce:

Run npm run build in project root
Build process fails during type checking

Logs

System Info

Next.js build worker exited with code: 1 and signal: null
(base) root@autodl-container-eba14895ba-d011f7e7:~/livekit/agents-playground# npx envinfo --system --binaries --browsers --npmPackages "{livekit-client, @livekit/*}"
Need to install the following packages:
[email protected]
Ok to proceed? (y) y


  System:
    OS: Linux 5.15 Ubuntu 20.04.5 LTS (Focal Fossa)
    CPU: (256) x64 AMD EPYC 9754 128-Core Processor
    Memory: 701.84 GB / 755.17 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 22.15.1 - /usr/bin/node
    npm: 10.9.2 - /usr/bin/npm
  npmPackages:
    livekit-client: ^2.9.5 => 2.13.3 

(base) root@autodl-container-eba14895ba-d011f7e7:~/livekit/agents-playground# npm list @livekit/components-react
[email protected] /root/livekit/agents-playground
`-- @livekit/[email protected]

(base) root@autodl-container-eba14895ba-d011f7e7:~/livekit/agents-playground#

Severity

annoyance

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions