Cannot find src/handler
See original GitHub issueWhile deploying the lambda function, I was getting an error of not being able to find the handler function. I then modified the serverless.yml and prefixed it with src like below
functions:
sharpImage:
description: Resizes images
memorySize: 1024
timeout: 30
handler: src/handler.processImage
The deploy went fine, but now while invoking it I get the following error:
$ yarn run invoke
yarn run v0.23.4
$ serverless invoke --function sharpImage --path ./event.json --log
{
"errorMessage": "Cannot find module '/var/task/src/handler'",
"errorType": "Error",
"stackTrace": []
}
--------------------------------------------------------------------
START RequestId: df6381c6-f0a5-11e7-baa4-a70b2f9693d9 Version: $LATEST
Unable to import module 'src/handler': Error
at require (internal/module.js:20:19)
END RequestId: df6381c6-f0a5-11e7-baa4-a70b2f9693d9
REPORT RequestId: df6381c6-f0a5-11e7-baa4-a70b2f9693d9 Duration: 0.43 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 21 MB
Error --------------------------------------------------
Invoked function failed
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Forums: forum.serverless.com
Chat: gitter.im/serverless/serverless
Your Environment Information -----------------------------
OS: darwin
Node Version: 8.8.0
Serverless Version: 1.24.1
error Command failed with exit code 1.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
cURL error 6: Could not resolve host, after successfully ...
I need to update all media in a larger Shopware shop, with about 10000 products. I use the Shopware php SDK by vienthuong....
Read more >Uncaught GuzzleHttp \Exception \ConnectException
Hi while I was going to the admin dashboard, I got (HTTP ERROR 500) and this was the error message: [13-Apr-2021 14:42:17 UTC]...
Read more >Fatal Error | WordPress.org
... not found in /home/mstpeters/public_html/wp-content/plugins/skaut-google-drive-gallery/bundled/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:201 ...
Read more >Why give this error? - HubSpot Community
Search APIs & Integrations for solutions or ask a question ... /opa/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:185 Stack trace: #0 ...
Read more >something wrong in reportDefinition? - Google Groups
But at the moment, i don't know, what is missing. ... in C:\Users\ladewig\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:187 Stack trace: #0 ...
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 Free
Top 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
Hey, It worked very well! thanks for the awesome library 😃
@love8587 — yes 0.11.0 should work fine. What issue are you having/what error are you seeing?