Skip to content

Cannot find module 'axios' in 9.3.0 #310

@TommySorensen

Description

@TommySorensen

Hi all
I am using the npx swagger-typescript-api like below to generate our types. Recently this has stopped working because of the script can't find the Axios package.

Console output:

$ npx swagger-typescript-api -p https://our-api-url/swagger/v1/swagger.json -o ./src/app/models/ -n index.ts --no-client --extract-request-params --extract-request-body
npx: installed 78 in 2.493s
Cannot find module 'axios'
Require stack:
- /Users/user/.npm/_npx/20804/lib/node_modules/swagger-typescript-api/src/swagger.js
- /Users/user/.npm/_npx/20804/lib/node_modules/swagger-typescript-api/src/index.js
- /Users/user/.npm/_npx/20804/lib/node_modules/swagger-typescript-api/index.js
error Command failed with exit code 1.

Any help is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions