Andrew Floatrx
Andrew Floatrx
Typescript: `openapi-config.ts` ```ts import { ConfigFile } from '@rtk-query/codegen-openapi'; const config: ConfigFile = { schemaFile: './openapi-spec.json', apiFile: './src/store/baseApi.ts', apiImport: 'baseApi', outputFile: './src/store/coreApi.ts', exportName: 'coreApi', hooks: true, }; export default config;...
```shell $ npx @rtk-query/codegen-openapi openapi-config.json Generating ./src/store/testApi.ts TypeError: s.replace is not a function at escapeString (/Users/floatrx/Projects/CORE/support-app/node_modules/@rtk-query/codegen-openapi/node_modules/typescript/lib/typescript.js:17825:18) at escapeNonAsciiString (/Users/floatrx/Projects/CORE/support-app/node_modules/@rtk-query/codegen-openapi/node_modules/typescript/lib/typescript.js:17830:13) at Object.getLiteralText (/Users/floatrx/Projects/CORE/support-app/node_modules/@rtk-query/codegen-openapi/node_modules/typescript/lib/typescript.js:14695:34) at getLiteralTextOfNode (/Users/floatrx/Projects/CORE/support-app/node_modules/@rtk-query/codegen-openapi/node_modules/typescript/lib/typescript.js:111651:23) at emitLiteral (/Users/floatrx/Projects/CORE/support-app/node_modules/@rtk-query/codegen-openapi/node_modules/typescript/lib/typescript.js:109040:24) at pipelineEmitWithHintWorker...
## My temporary solution -> "openapi-download" Simple util script (nodejs) ``` ├── openapi │ ├── config.ts │ ├── index.js │ └── schemas.json ├── package.json ``` `package.json` ```json "scripts": { "openapi":...
try 1. clean cache 2. upgrade npm & yarn 3. remove lock* files (yarn | npm) 4. re-install packages ```npm cache clean --force yarn cache clean --all npm install -g...
### 👋 I deleted the `*lock` files with `node_modules` and reinstalled the dependencies. In my case, it helped me!
+1 for debounce