Skip to content

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

Open
@ghost

Description

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions