This repository was archived by the owner on Jul 23, 2023. It is now read-only.
This repository was archived by the owner on Jul 23, 2023. It is now read-only.
Lambda Handler not being found when viewing the generated API Stage #118
Closed
Description
Issue
NodeJS 8.10 Handler 'render' missing on module 'contact'
NodeJS 10.x Contact.render is undefined or not exported
Expected Behavior
Page to be displayed.
Actual Behavior
Error message is shown and stack is logged to cloudwatch.
Steps to Reproduce the Problem
- Generate Example as shown in the integration section of the repository.
- Do a terraform apply
- Go to the generated link from the API Gateway and navigate to one of the routes.
- Review the cloudwatch log generated.
Specifications
- Next 9.1.2
- React 16.11.0
- React-dom 16.11
- Node 8.10 (Did try 10.x with updating the lambdas too)
- Terraform v0.11.15
- Version: latest
- Platform: Ubuntu / AWS
- Subsystem:
Example of lambda contents:
- Contact.js
"\n\nconst page = require('./contact.original.js');\nconst http = require('http')\n\nexports.render = (event, context, callback) => {\n\tconst server = new http.Server((req, res) => page.render(req, res));\n\tserver.listen(3000);\n};\n\n\n"
I have set the nextJs config to be serverless but it could be that it is not picking it up.
Metadata
Metadata
Assignees
Labels
No labels