question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crashed when use some of parameter decorators

See original GitHub issue

When I use @Body(), @Param(), @QueryParam() and etc, program will crash with this error

        var format = Reflect.getMetadata("design:paramtypes", object, methodName)[index];
                                                                                 ^

TypeError: Cannot read property '0' of undefined

routing-controllers 0.6.2 reflect-metadata 0.1.3 node 6.3.1

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
JD-Robbscommented, Aug 9, 2016

You’re awesome @pleerock - thanks a bunch for the pointer. Mea culpa!

emitDecoratorMetadata was the missing culprit in my case.

Like I said - this is a great project. As I’m transitioning to node from having worked with PHP MVCs for seven years, I’m really feeling at home now in the way I’m able to structure my code.

0reactions
github-actions[bot]commented, Dec 17, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python decorator crashing even though its code is solid, can't ...
So I wrote a function called 'anonimize' that gets a string and returns that string with some details blacked-out, using regex. The function ......
Read more >
How to use skip and xfail to deal with tests that cannot succeed
If multiple skipif decorators are applied to a test function, it will be skipped if any of the skip conditions is true. Skipping...
Read more >
Optimize Streamlit Deployment | Towards Data Science
In some cases, this can cause your app to crash or use up allotted resources. # Streamlit with Plotly, no cachingimport streamlit as...
Read more >
Functions - Object-Oriented Programming in Python
Because the inner function takes *args and **kwargs as its parameters, we can use this decorator to decorate any function, no matter what...
Read more >
Understanding Python Decorators - Techblog
- When the decorator is executed, the wrapped function is no longer passed as an argument, as this has already happened at initialisation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found