Skip to content

Error No models file found after upgrading to v1 #66

@jamesnw

Description

@jamesnw

I upgraded from 0.5.3 to 1.0.6, and ran-

openapi-rq -i src/client-gen/openapi.yml -c axios -o src/client

It starts generating, and outputs-

Then, it throws an Error at

throw new Error("No models file found");

✨ Creating Axios client
✨ Running Prettier
✨ Done! Your client is located in: /Users/devpath/src/client/requests
file:///Users/devpath/node_modules/@7nohe/openapi-react-query-codegen/dist/createImports.mjs:17
        throw new Error("No models file found");
              ^

Error: No models file found
    at createImports (file:///Users/devpath/node_modules/@7nohe/openapi-react-query-codegen/dist/createImports.mjs:17:15)
    at createSourceFile (file:///Users/devpath/node_modules/@7nohe/openapi-react-query-codegen/dist/createSource.mjs:18:21)
    at async createSource (file:///Users/devpath/node_modules/@7nohe/openapi-react-query-codegen/dist/createSource.mjs:47:71)
    at async generate (file:///Users/devpath/node_modules/@7nohe/openapi-react-query-codegen/dist/generate.mjs:37:20)

Node.js v18.16.0

I confirmed there is not a models.ts on disk, or in the response of project.getSourceFiles().

Did I miss a migration step somewhere? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions