-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I found a few possible errors, one which is breaking for me #117
Comments
Okay, ignore the first issue, I had updated the runtime, but yarn apparently didn't do it properly, just removed and reinstalled the packages and that fixed the issue. |
(note: the public API between `joi` and `zod` parts of the runtime should be identical, so this should effectively be a noop) relates #117
Raised #119 to address the For the:
It would be helpful to see your
and would recommend using https://github.com/tsconfig/bases/tree/main#node-20-tsconfigjson or equivalent as a base configuration which sets this by default |
{
"compilerOptions": {
/* Base Options */
"esModuleInterop": true,
"skipLibCheck": true,
"target": "esnext",
// "verbatimModuleSyntax": false,
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
/* Strictness */
"strict": true,
"noUncheckedIndexedAccess": true,
/* If transpiling with Typescript */
"moduleResolution": "node",
"module": "commonjs",
"outDir": "dist",
"sourceMap": true,
"lib": [
"es2022"
],
/* Others */
"checkJs": false,
"noEmitOnError": true,
"rootDir": ".",
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"declaration": true,
"strictNullChecks": true,
"pretty": true,
"noEmit": false,
"declarationMap": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"preserveConstEnums": true,
"importHelpers": true,
"noErrorTruncation": true,
"baseUrl": ".",
"paths": {
"@/*": [
"./src/*"
],
"@nahkies/typescript-koa-runtime/*": [
"../../node_modules/@nahkies/typescript-koa-runtime/dist/*"
],
},
"typeRoots": [
"../../node_modules/@types",
"./src/types",
],
"types": [],
},
"exclude": [
"node_modules",
"dist",
"tests"
],
"include": [
"./src/**/*"
]
} typescript version: 4.9 I've added a types workaround for your package, which fixed the issues in this, but as requested here is my tsconfig.json file. I can't remember what I based this tsconfig off, but it was a year ago. I'll take a look at the config you posted. |
So I ignored a few of the issues since, this project is still early, and they were only type issues that I could work around, but with version 0.3.0 another issue has cropped up that breaks things for me.
So the major issue that breaks things for me now, is the fact then after updating to 0.3.0 I am presented with
and the small but workaround issues that I have found since day one of using this, is also related in a way to the above, but not caused by it.
it seems the runtime has no issues with these paths, but typescript does, and adding
/src/
after@nahkies/typescript-koa-runtime
path fixes the typescript issues, so it's just a simple path rewrite that needs to happen for the typescript types.One last possible issue that I think you overlooked was you are linking
joi
definitions forzod
.openapi-code-generator/packages/typescript-koa-runtime/package.json
Line 37 in 6d6183a
It's possible one or more of these issues are related to my setup, so do let me know, thanks.
The text was updated successfully, but these errors were encountered: