Open ondra-rejnek opened 8 months ago
I get this too running npx @rtk-query/codegen-openapi <file-name>.ts
. Installing esbuild-runner
/ts-node
has no effect because of how npx works. I also tried yarn rtk-query-codegen-openapi <file-name>.ts
and node ./node_modules/@rtk-query/codegen-openapi/lib/bin/cli.js <file-name>.ts
. This is from a fresh install - anything I'm missing?
Ah - found you need to install ts-node if you're providing a ts/tsx file.
So do what you did before: yarn rtk-query-codegen-openapi <file-name>.ts
but also install ts-node: yarn add -D ts-node
this should be in the docs
same problem, after updating npm to 10.2.4 its stop worked for me
We ran into the same issue and figured out this error is only thrown with node@20
. Using node@17
npx @rtk-query/codegen-openapi ...
works fine.
node 16 - work fine, node 18 - error
I am trying to run
@rtk-query/codegen-openapi
in my repository. Providingopenapi-config.ts
as TS file. Ends up withEncountered a TypeScript configfile, but neither esbuild-runner nor ts-node are installed
. Both dependencies are installed tho. I am on MacOS (13.3.1 (22E261)), using zsh terminal