-
Notifications
You must be signed in to change notification settings - Fork 392
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
fix: TypeError: Cannot read properties of undefined (reading 'prototype') #924
Comments
I think instead of using the type Create a class A good example in the documentation is the class |
I am also getting same error even after following the docs. Can anyone help ? |
It’s a bit hard to diagnose without the full context. Did you import reflect-metadata? Are you using koa or express? |
Adding |
I'm getting the following error after building the app. I'm getting only when i pass query param.
/api/role is working fine. But /api/role?type=1 is throwing below error
" TypeError: Cannot read properties of undefined (reading 'prototype') at ActionParameterHandler.normalizeParamValue)
My code is below. I've emitDecoratorMetadata": true in tsconfig compilerOptions as well.
@Get('/role')
async getRole(@QueryParams() query: any) {
console.log(query.type)
}
Did I miss anything?
The text was updated successfully, but these errors were encountered: