stream-js icon indicating copy to clipboard operation
stream-js copied to clipboard

Error Using TS Version With Cloud Functions

Open rlee1990 opened this issue 3 years ago • 7 comments

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 avatar May 11 '21 15:05 rlee1990

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

rlee1990 avatar May 11 '21 15:05 rlee1990

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 [email protected] 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.

°°°

shodgetts avatar May 11 '21 17:05 shodgetts

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

rlee1990 avatar May 11 '21 17:05 rlee1990

@rlee1990 What is your ts version ?

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

ferhatelmas avatar May 11 '21 21:05 ferhatelmas

I am using 4.2.4 @ferhatelmas

rlee1990 avatar May 11 '21 21:05 rlee1990

@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?

mahboubii avatar May 12 '21 09:05 mahboubii

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.

JarrydMartin avatar Dec 30 '21 07:12 JarrydMartin