Error: Method block not found
Describe the bug
When I want to run yarn codegen , It throws this error:
Error: Method block not found
And with version "v2.0.0-beta.1", I get this error:
Error: Variable declaration not found
To Reproduce
just run : yarn codegen
OpenAPI spec file https://github.com/7nohe/openapi-react-query-codegen/blob/main/examples/petstore.yaml
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots or logs to help explain your problem.
- OS: [e.g. macOS]
- Version ^1.6.2
Additional context Add any other context about the problem here.
Did you ever find a solution for this? I'm facing the same problem
@claudioBarreira89 Unfortunately not. I just used Orval. It just works fine.
Just realised I was missing a peer depencency ts-morph. It worked after adding it!
Interesting! However, it's not mentioned anywhere, or at least I didn't see it
We tried adding ts-morph as a peer dependency to our project, but it didn't help. This error prevents us from updating to TypeScript v5.9.2.
Are there any updates to this? It is still totally blocking us from updating TypeScript post v5.9.2.
Just realised I was missing a peer depencency
ts-morph. It worked after adding it!
Thanks @claudioBarreira89, this fixed it for me.
Just realised I was missing a peer depencency
ts-morph. It worked after adding it!
For me worked only after update of ts-morph till latest version. Thanks!
Also hitting this - any chance the maintainer could update the repo to help others?
Hi @amcdnl have you tried installing ts-morph? I did npm install -D ts-morph and it solved the issue for me.
Thanks to @claudioBarreira89 https://github.com/7nohe/openapi-react-query-codegen/issues/178#issuecomment-2786107759