-
Notifications
You must be signed in to change notification settings - Fork 35
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
Class extends value undefined is not a constructor or null #572
Comments
Hello, I already found the issue reason I have installed the leatest version of typeorm ( I hope you can close the issue soon. Thanks |
Hi @AlanAlvarez5 Thanks for reporting this issue. I appreciate the work you've put into it already. I'm taking a look now and we'll get this released soon. |
Hey @AlanAlvarez5 I haven't yet been able to reproduce the stacktrace. Can you share your code where you're initializing your db connection using typeorm at the global level? |
Hello! This is de datadog serverless plugin config
This is the typeorm client init config
Additionally, I'm using Also, the version of serverless framework is Hope you can replicate the stacktrace. Let me know y you need anything else. |
Hi again @AlanAlvarez5, I spent a good deal of time looking into this issue. The cause is definitely not related to this repo, the serverless-plugin-datadog since the plugin code only runs on deploy, not on invocation. Instead, I suspect there is a circular dependency somewhere between your versions of Searching for the specific error you're hitting leads to this stackoverflow question which explains the most common cause for this error is circular dependencies. Since downgrading your version of Next steps for you are to first confirm my belief that this error is not datadog related. Redeploy your lambda function, removing all datadog instrumentation, specifically After that, you will need to track down exactly where the circular dependency is coming from. You'll want to use the stacktrace you shared above to open the specific files in your From there, you'll want to post this question to one of the packages that is involved in the circular dependency, I suspect this will be either Hope this helps. |
Hello, I already done that. Actually I have been working with the I disabled datadog plugin and packages in this ways:
Only with the plugin enabled throws error. I can share you the packages of my package json but, I do not have declared
|
Okay, thank you for that detailed explanation, that does indeed indicate that the issue is somewhere with the datadog instrumentation. Apologies for taking us off course. I am going to move this issue to the datadog-lambda-js repo. I'm not 100% certain that's where the bug is, but it's at least closer. I'll keep looking into this once it's moved. Since I haven't yet been able to reproduce this, are you able to create a small lambda function that does? If I can get a Let me know if you discover anything else in the meantime. |
Hey @AlanAlvarez5, I have an update for you. I spoke with the team and we think this issue might be caused by dependency collisions when using lambda layers. I assume the collision is happening with I assume you are uploading the dependencies by including the Finally it is time to execute your function. When resolving dependencies, the runtime looks in I suspect the reason why downgrading So what do you do about this? Stop using the Datadog lambda layer and instead install the Datadog dependencies yourself alongside all your other dependencies. To do so, you will instruct the Datadog plugin not to install the layer by including this in your custom:
datadog:
addLayers: false Then, include Let me know how this works out. |
Expected Behavior
Normal flow, performing traces and regular behavior.
Actual Behavior
Throws error, before running lambda code. "Class extends value undefined is not a constructor or null"
Steps to Reproduce the Problem
Specifications
Stacktrace
The text was updated successfully, but these errors were encountered: