Serverless with Nest.js on AWS Lambda throws Controller TypeError, function undefined #11657
Unanswered
basselabbara
asked this question in
Q&A
Replies: 2 comments 3 replies
-
@basselabbara I see it more as Q&A request and not a bug report. Moving it to discussions |
Beta Was this translation helpful? Give feedback.
3 replies
-
I have same error Any update? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Are you certain it's a bug?
Is the issue caused by a plugin?
Are you using the latest v3 release?
Is there an existing issue for this?
Issue description
I have Nest.js as part of monorepo with Nx.
Running Nest.js locally works fine, also creating a build and running it independently works fine.
When Nest is deployed to Lambda and I try to hit an endpoint, I get:
{ "statusCode": 500, "message": "Internal server error" }
It runs the decorators just fine, but when it reaches the controller's function it throws an error:
TypeError: Cannot read properties of undefined (reading 'getAllProfiles') at ProfileController.<anonymous> (/var/task/packages/backend/src/modules/profile/profile.controller.js:59:59)
Service configuration (serverless.yml) content
Command name and used flags
N/A
Command output
Environment information
Beta Was this translation helpful? Give feedback.
All reactions