GetStream / stream-js

JS / Browser Client - Build Activity Feeds & Streams with GetStream.io
https://getstream.io
BSD 3-Clause "New" or "Revised" License
331 stars 111 forks source link

Error Using TS Version With Cloud Functions #452

Open rlee1990 opened 3 years ago

rlee1990 commented 3 years ago

I keep getting the same error trying to upload the functions to firebase. The errors point to the ts parts of this package.

node_modules/getstream/lib/client.d.ts:97:35 - error TS1005: ',' expected.

97     deleted_foreign_ids: Array<[id: string, time: string]>;
                                     ~

node_modules/getstream/lib/client.d.ts:97:57 - error TS1005: ';' expected.

97     deleted_foreign_ids: Array<[id: string, time: string]>;
                                                           ~

node_modules/getstream/lib/client.d.ts:97:58 - error TS1131: Property or signature expected.

97     deleted_foreign_ids: Array<[id: string, time: string]>;
                                                            ~

node_modules/getstream/lib/client.d.ts:97:59 - error TS1109: Expression expected.

97     deleted_foreign_ids: Array<[id: string, time: string]>;
                                                             ~

node_modules/getstream/lib/client.d.ts:98:8 - error TS1109: Expression expected.

98     new: Array<Omit<Activity<ActivityType>, 'actor'> & {
          ~

node_modules/getstream/lib/client.d.ts:100:7 - error TS1005: '(' expected.

100     }>;
          ~

node_modules/getstream/lib/client.d.ts:101:12 - error TS1109: Expression expected.

101     app_id?: string;
               ~

node_modules/getstream/lib/client.d.ts:102:10 - error TS1109: Expression expected.

102     feed?: string;
             ~

node_modules/getstream/lib/client.d.ts:103:15 - error TS1109: Expression expected.

103     mark_read?: 'all' | 'current' | Array<string>;
                  ~

node_modules/getstream/lib/client.d.ts:103:50 - error TS1005: '(' expected.

103     mark_read?: 'all' | 'current' | Array<string>;
                                                     ~

node_modules/getstream/lib/client.d.ts:104:15 - error TS1109: Expression expected.

104     mark_seen?: 'all' | 'current' | Array<string>;
                  ~

node_modules/getstream/lib/client.d.ts:104:50 - error TS1005: '(' expected.

104     mark_seen?: 'all' | 'current' | Array<string>;
                                                     ~

node_modules/getstream/lib/client.d.ts:105:18 - error TS1109: Expression expected.

105     published_at?: string;
                     ~

node_modules/getstream/lib/client.d.ts:106:1 - error TS1128: Declaration or statement expected.

106 };
    ~

gz#11776

rlee1990 commented 3 years ago

As a workaround, I commented out anything related to the issue as it appears to just be around the real-time section.

shodgetts commented 3 years ago

Agent comment from Anders Lund in Zendesk ticket #11776:

Hello and thanks for submitting an issue to our GitHub repository. We’re glad you’re getting hands on with the product. The Issue section of this Github repo is now reserved only for bug reports and feature improvements and suggestions. It looks like what you’re looking for is technical support using the product as this is not a known issue. For this support, we would suggest emailing our Customer Success and Engineer support team at support@getstream.io with your application key or ID and we’ll be able to help you out. Thanks for your understanding, we’re going to mark this issue as closed. In case our understanding is incorrect and you are describing a bug, we apologize, and invite you to please follow up with a minimal reproduction of the bug and we will reopen the issue and investigate accordingly.

°°°

rlee1990 commented 3 years ago

This is a bug as this comes up when building to deploy and I started receiving this error with the latest version.

ferhatelmas commented 3 years ago

@rlee1990 What is your ts version ?

/cc @mahboubii would be nice to document min supported version in readme clearly 😅

rlee1990 commented 3 years ago

I am using 4.2.4 @ferhatelmas

mahboubii commented 3 years ago

@ferhatelmas we usually upgrade to the last typescript version and use the latest features which is breaking for older ts compilers. @nhannah what do you think?

JarrydMartin commented 2 years ago

I ran into this issue today too. I have down graded my typescript dependency version, and I am able to build and run my cloud function. I would not not like have to downgrade Typescript.