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
Question: TypeScript Configuration / getOwnMetadata() returns undefined #56
Comments
I have the same issue. |
Here's my tsconfig.json. Try with this and see if it helps. I'm not able to reproduce the issue. But I did notice some differences in our tsconfigs. {
"compilerOptions": {
"baseUrl": "./",
"emitDecoratorMetadata": true,
"declaration": true,
"experimentalDecorators": true,
"importHelpers": true,
"module": "commonjs",
"moduleResolution": "node",
"noImplicitAny": true,
"removeComments": true,
"strict": true,
"target": "es6",
"types": [
"node"
],
"paths": {
"@overnightjs/core": ["../src/core"],
"@overnightjs/jwt": ["../src/jwt"],
"@overnightjs/logger": ["../src/logger"]
}
},
"include": [
"./src/**/*"
],
"exclude": [
"**/node_modules/"
]
} |
@seanpmaxwell There is a problem with the published version |
Hmm i made sure to tsc before publishing. I thought that would overwrite all old files. I deleted .d.ts and .js and .js.map files this time and re-ran |
Let me know if version 1.7.2 fixes the issue. |
I downgraded to 1.6.2 and it solved it. 1.7.2 fixes it too. |
Please upgrade to 1.7.3 to make this problem go away |
Hello,
I try to use this project for my next js-server application. I tried many things to got this to working but for whatever reason the metadata could not be readen.
As far as I understand the problem for me are the getRouter() implementation in the main Server.js file. Line 65 always returns undefined:
var classMetadata = Reflect.getOwnMetadata(types_1.classMetadataKey, prototype);
Maybe I messed up with the tsconfig. These are my current settings:
For the demo purpose I used the example UserController.ts provided by the example application.
TypeScript: 3.9.2
Node: v14.1.0
npm: 6.14.4
@overnightjs/core 1.7.0
The readme says something about the
lib
property but no more information are given there -_- Many thanks for your support in advance.Dennis
The text was updated successfully, but these errors were encountered: