chargebee / chargebee-typescript

Typescript library for the Chargebee API.
https://apidocs.chargebee.com/docs/api?lang=typescript
MIT License
23 stars 15 forks source link

Version 2.2.0 fails to build #19

Open n3m6 opened 3 years ago

n3m6 commented 3 years ago

The typescript version fails to build. It seems the q library was not imported in the request_wrapper.ts file.

n3m6@yuki:~/work/payments-service$ yarn run build
yarn run v1.22.10
$ rimraf dist
$ nest build
node_modules/chargebee-typescript/lib/request_wrapper.d.ts:1:23 - error TS2688: Cannot find type definition file for 'q'.

1 /// <reference types="q" />
  1 /// <reference types="q" />
                        ~
node_modules/chargebee-typescript/lib/request_wrapper.d.ts:13:48 - error TS2503: Cannot find namespace 'Q'.

13     request(callBack?: any, envOptions?: any): Q.Promise<any>;
                                                  ~

Found 2 error(s).

Version 2.1.0 works fine though.

mwalden2004 commented 3 years ago

I can reproduce this problem, this is affecting a project I am working on right now.

Tobjoern commented 3 years ago

I can confirm this problem, too. I'm actively affected by this issue.

cb-yateshmathuria commented 3 years ago

Hi All, we have tried to reproduce this issue but we are not able to. Could you please tell us the following :

  1. How did you upgrade from 2.1.0 to 2.2.0?
  2. Could you please provide us your package.json and tsconfig.json files?

Thanks in advance!

mwalden2004 commented 3 years ago

This is the package.json: https://gist.github.com/mwalden2004/e4995509b0f78661188821f9a0a1c7d6 TsConfig: https://gist.github.com/mwalden2004/a9b6d610b00b3eb17aea639564c9be35

We are both using NuxtJS from what I can tell, not sure if that has anything to do with it. All I did was try to build to our staging environment and received the ts error.

On Thu, Sep 30, 2021 at 7:24 AM cb-yateshmathuria @.***> wrote:

Hi All, we have tried to reproduce this issue but we are not able to. Could you please tell us the following :

  1. How did you upgrade from 2.1.0 to 2.2.0?
  2. Could you please provide us your package.json and tsconfig.json files?

Thanks in advance!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/chargebee/chargebee-typescript/issues/19#issuecomment-931272987, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD5YALQRZIRNWSGVGCLFUZ3UERJGFANCNFSM5EG36KWQ .

cb-yateshmathuria commented 3 years ago

@mwalden2004 Thank you for the information.

We can't find chargebee-typescript in your package.json file. please confirm if and how you are using chargebee-typescript package in your project?

@n3m6 - Can you confirm if you are still facing the issue. If yes then could you provide your package.json and tsconfig.json files?

J4YF7O commented 2 years ago

Same for my team : using 2.4.1

Fix :

yarn add -D @types/q

...