I am trying to setup serverless api using stack:
nx 18 + nest + webpack + serverless
node: 20.x
gives error:
{
"errorType": "Runtime.HandlerNotFound",
"errorMessage": "src/main.handler is undefined or not exported",
"stack": [
"Runtime.HandlerNotFound: src/main.handler is undefined or not exported",
" at UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1122:15)",
" at async start (file:///var/runtime/index.mjs:1282:23)",
" at async file:///var/runtime/index.mjs:1288:1"
]
}
Is there an existing issue for this?
Current behavior
I am trying to setup serverless api using stack: nx 18 + nest + webpack + serverless node: 20.x
gives error:
Minimum reproduction code
https://github.com/pratik-github/demo-nx-nest-serverless
Steps to reproduce
Deployment is successful but when I hit api endpoint I get error;
Expected behavior
API should work
Package
Other package
No response
NestJS version
No response
Packages versions
Node.js version
20.9.0
In which operating systems have you tested?
Other
I have tested by deploying to aws lambda via serverless