livekit / client-sdk-js

LiveKit browser client SDK (javascript)

Home Page:https://livekit.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Angular 10 Compatibility Issue

harisnewbie opened this issue · comments

Describe the bug
After importing the Livekit Client in a component, the angular app won't start. It seems to be a compatibility issue.

Server

  • Version: 1.2.7
  • Environment: Local Dev ( Mac OS )

Client

  • SDK: JS
  • Version: 1.15.10

To Reproduce
Steps to reproduce the behavior:

  1. Create a Angular 10 app using Angular CLI
    npx -p @angular/cli@10.2.3 ng new angular10App
  2. Install "livekit-client"
    npm install livekit-client --save
  3. Import Room from "livekit-client" in a component
    import { Room } from 'livekit-client';

Additional Context
I am switching over from Twilio to Livekit. The project is too large and it would require updating the app to at least 5 major versions to meet the required typescript version. It would be great if the client SDK was backwards compatible.

Log

ERROR in node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:19 - error TS1005: ']' expected.

88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                     ~~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:22 - error TS1005: ';' expected.

88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                        ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:27 - error TS1005: ';' expected.

88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                             ~~~~~~~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:55 - error TS1005: ';' expected.

88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                                                         ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:56 - error TS1128: Declaration or statement expected.

88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                                                          ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:74 - error TS1005: '(' expected.

88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                                                                            ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:89:1 - error TS1128: Declaration or statement expected.

89 };
   ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:19 - error TS1005: ']' expected.

113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                      ~~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:22 - error TS1005: ';' expected.

113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                         ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:27 - error TS1005: ';' expected.

113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                              ~~~~~~~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:55 - error TS1005: ';' expected.

113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                                                          ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:56 - error TS1128: Declaration or statement expected.

113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                                                           ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:57 - error TS1128: Declaration or statement expected.

113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                                                            ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:77 - error TS1005: '(' expected.

113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                                                                                ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:114:1 - error TS1128: Declaration or statement expected.

114 };
    ~
node_modules/livekit-client/dist/src/e2ee/KeyProvider.d.ts:2:15 - error TS1005: ',' expected.

2 import { type KeyProviderCallbacks } from './events';
                ~~~~~~~~~~~~~~~~~~~~
node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:15 - error TS1005: ',' expected.

6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                ~~~~~~~~~~~~~~~
node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:37 - error TS1005: ',' expected.

6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                      ~~~~~~~~~~~~~~~~~~~~~~~
node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:67 - error TS1005: ',' expected.

6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                                                    ~~~~~~~~~~~~
node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:93m6:86 - error TS1005: ',' expected.

6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                                                                       ~~~~~~~~~~~~~~~~~
node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:135 - error TS1005: ',' expected.

6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                                                                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:170 - error TS1005: ',' expected.

6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                                                                                                                                                           ~~~~~~~~~~~~~~~~~~~~

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

Date: 2024-01-24T01:49:34.277Z - Hash: 326fc5b9e9ecccc01c48
6 unchanged chunks

Time: 968ms

WARNING in ./src/styles.css (./node_modules/css-loader/dist/cjs.js??ref--12-1!./node_modules/postcss-loader/src??embedded!./src/styles.css)
Module Warning (from ./node_modules/postcss-loader/src/index.js):
Warning

(1329:3) end value has mixed support, consider using flex-end instead

ERROR in node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:19 - error TS1005: ']' expected.

88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                     ~~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:22 - error TS1005: ';' expected.

88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                        ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:27 - error TS1005: ';' expected.

88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                             ~~~~~~~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:55 - error TS1005: ';' expected.

88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                                                         ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:56 - error TS1128: Declaration or statement expected.

88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                                                          ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:74 - error TS1005: '(' expected.

88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                                                                            ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:89:1 - error TS1128: Declaration or statement expected.

89 };
   ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:19 - error TS1005: ']' expected.

113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                      ~~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:22 - error TS1005: ';' expected.

113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                         ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:27 - error TS1005: ';' expected.

113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                              ~~~~~~~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:55 - error TS1005: ';' expected.

113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                                                          ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:56 - error TS1128: Declaration or statement expected.

113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                                                           ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:57 - error TS1128: Declaration or statement expected.

113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                                                            ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:77 - error TS1005: '(' expected.

113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                                                                                ~
node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:114:1 - error TS1128: Declaration or statement expected.

114 };
    ~
node_modules/livekit-client/dist/src/e2ee/KeyProvider.d.ts:2:15 - error TS1005: ',' expected.

2 import { type KeyProviderCallbacks } from './events';
                ~~~~~~~~~~~~~~~~~~~~
node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:15 - error TS1005: ',' expected.

6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                ~~~~~~~~~~~~~~~
node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:37 - error TS1005: ',' expected.

6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                      ~~~~~~~~~~~~~~~~~~~~~~~
node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:67 - error TS1005: ',' expected.

6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                                                    ~~~~~~~~~~~~
node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:93m6:86 - error TS1005: ',' expected.

6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                                                                       ~~~~~~~~~~~~~~~~~
node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:135 - error TS1005: ',' expected.

6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                                                                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:170 - error TS1005: ',' expected.

6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                                                                                                                                                           ~~~~~~~~~~~~~~~~~~~~

    
    ERROR in node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:19 - error TS2304: Cannot find name 'as'.
    
    88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                         ~~
    node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:22 - error TS2304: Cannot find name 'T'.
    
    88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                            ~
    node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:24 - error TS2304: Cannot find name 'P'.
    
    88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                              ~
    node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:46 - error TS2693: 'never' only refers to a type, but is being used as a value here.
    
    88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                                                    ~~~~~
    node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:54 - error TS2304: Cannot find name 'P'.
    
    88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                                                            ~
    node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:58 - error TS2693: 'PlainField' only refers to a type, but is being used as a value here.
    
    88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                                                                ~~~~~~~~~~
    node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:69 - error TS2304: Cannot find name 'T'.
    
    88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                                                                           ~
    node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:88:71 - error TS2304: Cannot find name 'P'.
    
    88     [P in keyof T as T[P] extends Function ? never : P]: PlainField<T[P]>;
                                                                             ~
    node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:19 - error TS2304: Cannot find name 'as'.
    
    113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                          ~~
    node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:22 - error TS2304: Cannot find name 'T'.
    
    113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                             ~
    node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:24 - error TS2304: Cannot find name 'P'.
    
    113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                               ~
    node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:46 - error TS2693: 'never' only refers to a type, but is being used as a value here.
    
    113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                                                     ~~~~~
    node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:54 - error TS2304: Cannot find name 'P'.
    
    113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                                                             ~
    node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:59 - error TS2693: 'PartialField' only refers to a type, but is being used as a value here.
    
    113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                                                                  ~~~~~~~~~~~~
    node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:72 - error TS2304: Cannot find name 'T'.
    
    113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                                                                               ~
    node_modules/@bufbuild/protobuf/dist/cjs/message.d.ts:113:74 - error TS2304: Cannot find name 'P'.
    
    113     [P in keyof T as T[P] extends Function ? never : P]?: PartialField<T[P]>;
                                                                                 ~
    node_modules/livekit-client/dist/src/room/utils.d.ts:31:47 - error TS2304: Cannot find name 'ResizeObserver'.
    
    31 export declare const getResizeObserver: () => ResizeObserver;
                                                     ~~~~~~~~~~~~~~
    node_modules/livekit-client/dist/src/room/utils.d.ts:34:27 - error TS2304: Cannot find name 'ResizeObserverEntry'.
    
    34     handleResize: (entry: ResizeObserverEntry) => void;
                                 ~~~~~~~~~~~~~~~~~~~
    node_modules/livekit-client/dist/src/e2ee/KeyProvider.d.ts:2:10 - error TS2305: Module '"./events"' has no exported member 'type'.
    
    2 import { type KeyProviderCallbacks } from './events';
               ~~~~
    node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:10 - error TS2300: Duplicate identifier 'type'.
    
    6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
               ~~~~
    node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:32 - error TS2300: Duplicate identifier 'type'.
    
    6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                     ~~~~
    node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:10 - error TS2300: Duplicate identifier 'type'.
    
    6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
               ~~~~
    node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:62 - error TS2300: Duplicate identifier 'type'.
    
    6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                                                   ~~~~
    node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:10 - error TS2300: Duplicate identifier 'type'.
    
    6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
               ~~~~
    node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:81 - error TS2300: Duplicate identifier 'type'.
    
    6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                                                                      ~~~~
    node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:10 - error TS2300: Duplicate identifier 'type'.
    
    6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
               ~~~~
    node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:130 - error TS2300: Duplicate identifier 'type'.
    
    6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                                                                                                                       ~~~~
    node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:10 - error TS2300: Duplicate identifier 'type'.
    
    6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
               ~~~~
    node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:165 - error TS2300: Duplicate identifier 'type'.
    
    6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                                                                                                                                                          ~~~~
    node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:10 - error TS2305: Module '"../proto/livekit_rtc_pb"' has no exported member 'type'.
    
    6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
               ~~~~
    node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:32 - error TS2305: Module '"../proto/livekit_rtc_pb"' has no exported member 'type'.
    
    6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                     ~~~~
    node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:62 - error TS2305: Module '"../proto/livekit_rtc_pb"' has no exported member 'type'.
    
    6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                                                   ~~~~
    node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:81 - error TS2305: Module '"../proto/livekit_rtc_pb"' has no exported member 'type'.
    
    6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                                                                      ~~~~
    node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:130 - error TS2305: Module '"../proto/livekit_rtc_pb"' has no exported member 'type'.
    
    6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                                                                                                                       ~~~~
    node_modules/livekit-client/dist/src/room/RTCEngine.d.ts:6:165 - error TS2305: Module '"../proto/livekit_rtc_pb"' has no exported member 'type'.
    
    6 import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, SubscribedQualityUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse, TrackUnpublishedResponse } from '../proto/livekit_rtc_pb';
                                                                                                                                                                          ~~~~
    node_modules/livekit-client/dist/src/e2ee/utils.d.ts:4:45 - error TS2304: Cannot find name 'RTCEncodedAudioFrame'.
    
    4 export declare function isVideoFrame(frame: RTCEncodedAudioFrame | RTCEncodedVideoFrame): frame is RTCEncodedVideoFrame;
                                                  ~~~~~~~~~~~~~~~~~~~~
    node_modules/livekit-client/dist/src/e2ee/utils.d.ts:4:68 - error TS2304: Cannot find name 'RTCEncodedVideoFrame'.
    
    4 export declare function isVideoFrame(frame: RTCEncodedAudioFrame | RTCEncodedVideoFrame): frame is RTCEncodedVideoFrame;
                                                                         ~~~~~~~~~~~~~~~~~~~~
    node_modules/livekit-client/dist/src/e2ee/utils.d.ts:4:100 - error TS2304: Cannot find name 'RTCEncodedVideoFrame'.
    
    4 export declare function isVideoFrame(frame: RTCEncodedAudioFrame | RTCEncodedVideoFrame): frame is RTCEncodedVideoFrame;

@harisnewbie could you try enabling skipLibCheck in your tsconfig.json? Since these are types referenced internally to LiveKit SDK, your application should not need to verify types against older Typescript definitions

I tried enabling skipLibCheck but it doesn't seem to fix the issue.

{
  ...,
  "compilerOptions": {
    ...,
    "skipLibCheck": true
  }
}

Hi @harisnewbie ,

@davidzhao is right, skipLibCheck should make that error go away.
Maybe try with a clean install+build after adding that option?
There's also a project called downlevel-ts that you could try to use. We already apply this to make it backwards compatible down to TS 4.2

I'm not super familiar with the angular setup, is angular trying to build the library from scratch or is it "just" doing the typechecking?

Hello @lukasIO,
I tried adding skipLibCheck in tsconfig and clean installed the dependencies, but it didn't help.
Also, I upgraded the version the Angular version to 12, which also upgraded typescript to 4.3.5.
I am still facing the same issue.

Stackblitz URL : https://base-angular-12-app-9pfoeg.stackblitz.io

thanks for the stackblitz reproduction, could we get an editable link for this, too? right now there's no way (I think) to see the setup code, only the output gets shown on that link

hm, with ivy disabled it starts working for me https://stackblitz.com/edit/base-angular-12-app-tk1ssq?file=tsconfig.json
also added the skipLibCheck and an exclude parameter in the tsconfig.json.

I think the path to tsconfig.json was wrong in angular.json. It was trying to load tsconfig.app.json which (at least in this setup) didn't exist

Below is my current tsconfig.json

/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
  "compileOnSave": false,
  "compilerOptions": {
    "types": ["gapi", "gapi.auth2"],
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es2015",
    "module": "es2020",
    "lib": [
      "es2018",
      "dom"
    ],
    "skipLibCheck": true,
  },
  "exclude": ["node_modules/livekit-client/*"],
  "angularCompilerOptions" : {
    "enaableIvy" : false
  }
}

I am not sure where I am going wrong but it won't work in the main project. Let me keep trying.

"exclude": ["node_modules/livekit-client/*"],

with flattened dependencies (the default for npm) it probably won't be enough to exclude livekit-client as most of the errors you posted at the beginning of the thread originate from a third party dependency (protobuf-es) that livekit-client uses internally.

"enaableIvy" : false

there's a typo in there. Also, I read that since Angular 12 you cannot "simply" disable ivy? not sure how that works, for stackblitz there was an explicit option in the settings menu for that.

I changed the value for exclude parameter to

  "exclude": [
    "node_modules",
    "./node_modules",
    "./node_modules/*"
  ],

And yes, you're right. Disabling Ivy is not an option from Angular 12 and above. :(

@harisnewbie did you find the solution? I have the same problem and unfortunately the methods mentioned above do not work for me.