swagger-typescript-api icon indicating copy to clipboard operation
swagger-typescript-api copied to clipboard

Cannot read property 'prototype' of undefined when instantiating Axios class from template

Open ghost opened this issue 3 years ago • 4 comments

Hi everyone, how are you doing? I've been playing with the axios template but can't figure out what's wrong here. Whenever I try to instantiate the api I get the following error:

Cannot read property 'prototype' of undefined

with BFF being the class exported by the typescript file generated when running the command to generate axios code from swagger docs:

npx swagger-typescript-api -p ./src/clients/bff/bff.json -o ./src -n clients/bff/bff.ts --axios --api-class-name BFF

What am I missing here? Screenshot 2022-11-22 at 19 00 34 Screenshot 2022-11-22 at 19 00 23 Screenshot 2022-11-22 at 18 59 13

ghost avatar Nov 23 '22 06:11 ghost