acacode / swagger-typescript-api

Generate the API Client for Fetch or Axios from an OpenAPI Specification
MIT License
3.27k stars 354 forks source link

RangeError: Maximum call stack size exceeded #659

Open bhemsen opened 11 months ago

bhemsen commented 11 months ago

Hi, i have a Problem using node 18.18.2 and swagger-typescript-api 13.0.3. npx swagger-typescript-api -p https://myurl/ -o ./my-output -n generated.ts --no-client --route-types runs into a 'RangeError: Maximum call stack size exceeded'. As mentioned before, I use node node 18 and the current swagger-typescript-api version 13.0.3. My Typescript Version is 5.1.6. This is my Stacktrace: .........../node_modules/http2-client/lib/request.js:128 return this[method](...arguments); ^ RangeError: Maximum call stack size exceeded at Arguments.values (<anonymous>) at ClientRequest.genericStubber (..../node_modules/http2-client/lib/request.js:128:26) at ClientRequest.method (.../node_modules/http2-client/lib/request.js:44:23) at ClientRequest.genericStubber (..../node_modules/http2-client/lib/request.js:128:26) at ClientRequest.method (..../node_modules/http2-client/lib/request.js:44:23) at ClientRequest.genericStubber (..../node_modules/http2-client/lib/request.js:128:26) at ClientRequest.method (.../node_modules/http2-client/lib/request.js:44:23) at ClientRequest.genericStubber (..../node_modules/http2-client/lib/request.js:128:26) at ClientRequest.method (/home/..../node_modules/http2-client/lib/request.js:44:23) at ClientRequest.genericStubber (.../node_modules/http2-client/lib/request.js:128:26) I tried to google it and searched github issues but didn't find any solution. Does somebody have an advice? I recently upgraded to the current versions. with node 14, "swagger-typescript-api": "9.3.1", and "typescript": "~4.4.4", it worked fine (bearbeitet)

curtisburns commented 7 months ago

I'm also getting the same error. I run swagger-typescript-api using the npx command. Node v18.16.0, typescript v5.2.2.