Serverless example doesn't work
See original GitHub issueDescribe the bug
Wrapped app.handler
inside the serverless-http
default export just like the example did but got an error.
TypeError: Cannot read property 'settings' of undefined
at handler (...\node_modules\@tinyhttp\app\dist\index.cjs:287:37)
at ...\node_modules\serverless-http\lib\framework\get-framework.js:9:5
at ...\node_modules\serverless-http\serverless-http.js:19:28
To Reproduce
exports.handler = serverless(app.handler)
Versions
node
: 12.x (serverless)@tinyhttp/app
: 1.1.11
Additional context
Works if I wrap express
app inside serverless
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
How to Troubleshoot Serverless API's
But this doesn't provide us all the info we need if our API begins to ... For example, if we have Lambda functions...
Read more >Top 10 Serverless Deployment Errors (and How to Fix Them)
Alternatively, you can open the AWS Console, navigate to CloudFormation, and find the failed stack in your Stacks list: In the case of...
Read more >Serverless example doesn't work · Issue #222 - GitHub
Describe the bug Wrapped app.handler inside the serverless-http default export just like the example did but got an error.
Read more >Why does my Serverless Function work locally but not when ...
One of the common reasons for different behavior across environments is whether or not your Serverless Functions depend on packages with native dependencies....
Read more >serverless: function doesn't exist in this service - Stack Overflow
Your template is invalid. You can't just put your function under an arbitrary node to tell the framework that it applies to some...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ahmad-reza619 looks like your workaround works, then I will update the example and close the issue
Hi there, i believe this has to do with where the function is called, you can refer more explanation here
CMIIW but I think the workaround is like this